[llvm] ff2f509 - [Attributor] Fold single-use variable into assert
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 23 09:42:32 PDT 2020
Author: Benjamin Kramer
Date: 2020-03-23T17:41:52+01:00
New Revision: ff2f5097ed448bb4fdd25c7f5ebf4ad70a8af484
URL: https://github.com/llvm/llvm-project/commit/ff2f5097ed448bb4fdd25c7f5ebf4ad70a8af484
DIFF: https://github.com/llvm/llvm-project/commit/ff2f5097ed448bb4fdd25c7f5ebf4ad70a8af484.diff
LOG: [Attributor] Fold single-use variable into assert
Fixes unused variable warning in Release builds.
Added:
Modified:
llvm/lib/Transforms/IPO/Attributor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 2111f9ffac42..445ef3a5f4ce 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -8661,9 +8661,9 @@ static bool runAttributorOnFunctions(InformationCache &InfoCache,
A.identifyDefaultAbstractAttributes(*F);
}
- Module &M = *Functions.front()->getParent();
ChangeStatus Changed = A.run();
- assert(!verifyModule(M, &errs()) && "Module verification failed!");
+ assert(!verifyModule(*Functions.front()->getParent(), &errs()) &&
+ "Module verification failed!");
LLVM_DEBUG(dbgs() << "[Attributor] Done with " << Functions.size()
<< " functions, result: " << Changed << ".\n");
return Changed == ChangeStatus::CHANGED;
More information about the llvm-commits
mailing list