[llvm] [test][CAS] Fix unused variable warning in unittest (PR #159594)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 09:59:31 PDT 2025


amy-kwan wrote:

Thanks for this fix @cachemeifyoucan! I don't think the AIX bot is building this commit yet, but I've tried it locally and now I'm seeing the same issue as the build prior to [build 5822](https://lab.llvm.org/buildbot/#/builders/64/builds/5822), specifically the issue in [build 5821](https://lab.llvm.org/buildbot/#/builders/64/builds/5821/steps/6/logs/stdio) where the issue looks like this:
```
FAILED: [code=8] unittests/CAS/CASTests 
: && /home/llvm/llvm-external-buildbots/clang.20.1.7/bin/clang++ -pthread -mcmodel=large -fPIC -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,-bnoipath -Wl,-bglink=large unittests/CAS/CMakeFiles/CASTests.dir/ActionCacheTest.cpp.o unittests/CAS/CMakeFiles/CASTests.dir/CASTestConfig.cpp.o unittests/CAS/CMakeFiles/CASTests.dir/ObjectStoreTest.cpp.o unittests/CAS/CMakeFiles/CASTests.dir/ProgramTest.cpp.o -o unittests/CAS/CASTests  -Wl,-blibpath:/usr/lib:/lib  lib/libLLVMSupport.a  lib/libLLVMCAS.a  lib/libLLVMTestingSupport.a  lib/libllvm_gtest_main.a  lib/libllvm_gtest.a  -lrt  -lld  -lpthreads  -lm  lib/libLLVMDemangle.a  -lpthread && :
ld: 0711-317 ERROR: Undefined symbol: .flock
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
clang++: error: linker command failed with exit code 8 (use -v to see invocation)
```

https://github.com/llvm/llvm-project/pull/159594


More information about the llvm-commits mailing list