[llvm] 9fb6782 - [rs4gc] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 6 11:42:33 PST 2021
Author: Fangrui Song
Date: 2021-03-06T11:42:27-08:00
New Revision: 9fb6782c694582604c4fd96845f92f180d4b8d29
URL: https://github.com/llvm/llvm-project/commit/9fb6782c694582604c4fd96845f92f180d4b8d29
DIFF: https://github.com/llvm/llvm-project/commit/9fb6782c694582604c4fd96845f92f180d4b8d29.diff
LOG: [rs4gc] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds
Added:
Modified:
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index fd92695fbc033..08e00bb36533d 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -834,11 +834,13 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &Cache) {
// below. This is important for deterministic compilation.
MapVector<Value *, BDVState> States;
+#ifndef NDEBUG
auto VerifyStates = [&]() {
for (auto &Entry : States) {
assert(Entry.first == Entry.second.getOriginalValue());
}
};
+#endif
// Recursively fill in all base defining values reachable from the initial
// one for which we don't already know a definite base value for
More information about the llvm-commits
mailing list