From 5a23a520fc64b8da25d0027f08c051b0ad49b459 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 10 Sep 2025 16:53:09 -0700 Subject: [PATCH] Fix a `-Wunused-variable` warning on windows The `UID` variable is only being used inside the `#ifndef _WIN32` block - move the definition into the block as well. --- llvm/unittests/Support/VirtualOutputBackendsTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/unittests/Support/VirtualOutputBackendsTest.cpp b/llvm/unittests/Support/VirtualOutputBackendsTest.cpp index 3aee880a377df..03a4a9c3c7c32 100644 --- a/llvm/unittests/Support/VirtualOutputBackendsTest.cpp +++ b/llvm/unittests/Support/VirtualOutputBackendsTest.cpp @@ -559,9 +559,9 @@ Error OnDiskOutputBackendProvider::checkKept(StringRef FilePath, if (Error E = lookupFileInfo(FilePath, Info)) return E; +#ifndef _WIN32 sys::fs::UniqueID UID = shouldUseTemporaries(*Info) ? *Info->TempUID : *Info->UID; -#ifndef _WIN32 if (!Info->F->hasUniqueID(UID)) return createStringError(inconvertibleErrorCode(), "File not created by keep or changed UID");