[llvm] a7ef45b - [NewPM] Fix -Wunused-lambda-capture in -DLLVM_ENABLE_ASSERTIONS=off builds after D91327
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 11:30:24 PDT 2021
Author: Fangrui Song
Date: 2021-04-06T11:30:20-07:00
New Revision: a7ef45bc5c1d0c2788680dbcb261304d7dfae03c
URL: https://github.com/llvm/llvm-project/commit/a7ef45bc5c1d0c2788680dbcb261304d7dfae03c
DIFF: https://github.com/llvm/llvm-project/commit/a7ef45bc5c1d0c2788680dbcb261304d7dfae03c.diff
LOG: [NewPM] Fix -Wunused-lambda-capture in -DLLVM_ENABLE_ASSERTIONS=off builds after D91327
Added:
Modified:
llvm/lib/Passes/StandardInstrumentations.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index b23150f9ccc04..93cc50042be0d 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -1072,6 +1072,7 @@ void PreservedCFGCheckerInstrumentation::registerCallbacks(
PIC.registerBeforeNonSkippedPassCallback(
[this, &FAM](StringRef P, Any IR) {
assert(&PassStack.emplace_back(P));
+ (void)this;
if (!any_isa<const Function *>(IR))
return;
@@ -1084,6 +1085,7 @@ void PreservedCFGCheckerInstrumentation::registerCallbacks(
[this](StringRef P, const PreservedAnalyses &PassPA) {
assert(PassStack.pop_back_val() == P &&
"Before and After callbacks must correspond");
+ (void)this;
});
PIC.registerAfterPassCallback([this, &FAM,
@@ -1091,6 +1093,7 @@ void PreservedCFGCheckerInstrumentation::registerCallbacks(
const PreservedAnalyses &PassPA) {
assert(PassStack.pop_back_val() == P &&
"Before and After callbacks must correspond");
+ (void)this;
if (!any_isa<const Function *>(IR))
return;
More information about the llvm-commits
mailing list