diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2017-01-11 08:23:29 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2017-01-11 08:23:29 +0000 |
commit | babd4476b2fa93ce2e746b9d8ca165c6fc3449d5 (patch) | |
tree | c4101522bdfbd83673bcb92e79cace673267d9ff /llvm | |
parent | 80813b157ebb4ae11fcc80bd1c95363218cf6f9c (diff) | |
download | bcm5719-llvm-babd4476b2fa93ce2e746b9d8ca165c6fc3449d5.tar.gz bcm5719-llvm-babd4476b2fa93ce2e746b9d8ca165c6fc3449d5.zip |
[PM] Pull a lambda out of an argument into a named variable to try and
get a little more clarity about the nature of the issue MSVC is having
with this code.
llvm-svn: 291656
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/unittests/Analysis/LoopPassManagerTest.cpp | 13 |
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)); } }; |