summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/MustExecute.cpp
diff options
context:
space:
mode:
authorMikael Holmen <mikael.holmen@ericsson.com>2019-10-31 09:40:29 +0100
committerMikael Holmen <mikael.holmen@ericsson.com>2019-10-31 09:41:05 +0100
commitc9504954052a7630a6e760006297b5fc73a03e4a (patch)
tree4ac8b9a481b6a77f9dc48ce4d069f820fe60ad56 /llvm/lib/Analysis/MustExecute.cpp
parent71aa3f7b7e43bf7d2a8a38324b1f9f7b12bbbdfc (diff)
downloadbcm5719-llvm-c9504954052a7630a6e760006297b5fc73a03e4a.tar.gz
bcm5719-llvm-c9504954052a7630a6e760006297b5fc73a03e4a.zip
[MustExecute] Silence clang warning about unused captured 'this'
New code introduced in fe799c97fa caused clang to complain with ../lib/Analysis/MustExecute.cpp:360:34: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] GetterTy<LoopInfo> LIGetter = [this](const Function &F) { ^~~~ ../lib/Analysis/MustExecute.cpp:365:44: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] GetterTy<PostDominatorTree> PDTGetter = [this](const Function &F) { ^~~~ 2 errors generated.
Diffstat (limited to 'llvm/lib/Analysis/MustExecute.cpp')
-rw-r--r--llvm/lib/Analysis/MustExecute.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MustExecute.cpp b/llvm/lib/Analysis/MustExecute.cpp
index a796cc79ad8..585c984a00f 100644
--- a/llvm/lib/Analysis/MustExecute.cpp
+++ b/llvm/lib/Analysis/MustExecute.cpp
@@ -357,12 +357,12 @@ bool MustBeExecutedContextPrinter::runOnModule(Module &M) {
// We provide non-PM analysis here because the old PM doesn't like to query
// function passes from a module pass. Given that this is a printer, we don't
// care much about memory leaks.
- GetterTy<LoopInfo> LIGetter = [this](const Function &F) {
+ GetterTy<LoopInfo> LIGetter = [](const Function &F) {
DominatorTree *DT = new DominatorTree(const_cast<Function &>(F));
LoopInfo *LI = new LoopInfo(*DT);
return LI;
};
- GetterTy<PostDominatorTree> PDTGetter = [this](const Function &F) {
+ GetterTy<PostDominatorTree> PDTGetter = [](const Function &F) {
PostDominatorTree *PDT = new PostDominatorTree(const_cast<Function &>(F));
return PDT;
};
OpenPOWER on IntegriCloud