[llvm] r252070 - Orc: Streamline some lambda usage in a unit test
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 4 11:43:24 PST 2015
Author: dblaikie
Date: Wed Nov 4 13:43:24 2015
New Revision: 252070
URL: http://llvm.org/viewvc/llvm-project?rev=252070&view=rev
Log:
Orc: Streamline some lambda usage in a unit test
Modified:
llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
Modified: llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp?rev=252070&r1=252069&r2=252070&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp (original)
+++ llvm/trunk/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp Wed Nov 4 13:43:24 2015
@@ -69,15 +69,11 @@ TEST(CompileOnDemandLayerTest, FindSymbo
typedef decltype(MockBaseLayer) MockBaseLayerT;
DummyCallbackManager CallbackMgr;
- auto StubsMgrBuilder =
- []() {
- return llvm::make_unique<DummyStubsManager>();
- };
- llvm::orc::CompileOnDemandLayer<MockBaseLayerT>
- COD(MockBaseLayer,
- [](Function &F) { std::set<Function*> S; S.insert(&F); return S; },
- CallbackMgr, StubsMgrBuilder, true);
+ llvm::orc::CompileOnDemandLayer<MockBaseLayerT> COD(
+ MockBaseLayer, [](Function &F) { return std::set<Function *>{&F}; },
+ CallbackMgr, [] { return llvm::make_unique<DummyStubsManager>(); }, true);
+
auto Sym = COD.findSymbol("foo", true);
EXPECT_TRUE(!!Sym)
More information about the llvm-commits
mailing list