summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Analysis/LoopPassManagerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/Analysis/LoopPassManagerTest.cpp')
-rw-r--r--llvm/unittests/Analysis/LoopPassManagerTest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/unittests/Analysis/LoopPassManagerTest.cpp b/llvm/unittests/Analysis/LoopPassManagerTest.cpp
index 97c27987909..6288dc993e4 100644
--- a/llvm/unittests/Analysis/LoopPassManagerTest.cpp
+++ b/llvm/unittests/Analysis/LoopPassManagerTest.cpp
@@ -82,13 +82,14 @@ protected:
ON_CALL(static_cast<DerivedT &>(*this),
run(_, _, testing::Matcher<ExtraArgTs>(_)...))
.WillByDefault(Return(this->getResult()));
+ auto InvalidateLambda = [](IRUnitT &IR, const PreservedAnalyses &PA,
+ typename AnalysisManagerT::Invalidator &Inv) {
+ auto PAC = PA.template getChecker<Analysis>();
+ return !PAC.preserved() &&
+ !PAC.template preservedSet<AllAnalysesOn<IRUnitT>>();
+ };
ON_CALL(static_cast<DerivedT &>(*this), invalidate(_, _, _))
- .WillByDefault(Invoke([](IRUnitT &IR, const PreservedAnalyses &PA,
- typename AnalysisManagerT::Invalidator &Inv) {
- auto PAC = PA.template getChecker<Analysis>();
- return !PAC.preserved() &&
- !PAC.template preservedSet<AllAnalysesOn<IRUnitT>>();
- }));
+ .WillByDefault(Invoke(InvalidateLambda));
}
};
OpenPOWER on IntegriCloud