From c9504954052a7630a6e760006297b5fc73a03e4a Mon Sep 17 00:00:00 2001 From: Mikael Holmen Date: Thu, 31 Oct 2019 09:40:29 +0100 Subject: [PATCH] [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 LIGetter = [this](const Function &F) { ^~~~ ../lib/Analysis/MustExecute.cpp:365:44: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] GetterTy PDTGetter = [this](const Function &F) { ^~~~ 2 errors generated. --- llvm/lib/Analysis/MustExecute.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Analysis/MustExecute.cpp b/llvm/lib/Analysis/MustExecute.cpp index a796cc7..585c984 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 LIGetter = [this](const Function &F) { + GetterTy LIGetter = [](const Function &F) { DominatorTree *DT = new DominatorTree(const_cast(F)); LoopInfo *LI = new LoopInfo(*DT); return LI; }; - GetterTy PDTGetter = [this](const Function &F) { + GetterTy PDTGetter = [](const Function &F) { PostDominatorTree *PDT = new PostDominatorTree(const_cast(F)); return PDT; }; -- 2.7.4