diff options
author | Lang Hames <lhames@gmail.com> | 2018-04-02 20:57:56 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-04-02 20:57:56 +0000 |
commit | 3fdfc04e5339c1d0ad838c1e5531b3a2e4377ec3 (patch) | |
tree | b9a2a81ff5a623dc196685546a58e9f79790a22e /llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp | |
parent | 321c2487d7b1806cb3cc1a2391b130935bc06b64 (diff) | |
download | bcm5719-llvm-3fdfc04e5339c1d0ad838c1e5531b3a2e4377ec3.tar.gz bcm5719-llvm-3fdfc04e5339c1d0ad838c1e5531b3a2e4377ec3.zip |
[ORC] Create a new SymbolStringPool by default in ExecutionSession constructor.
This makes the common case of constructing an ExecutionSession tidier.
llvm-svn: 329013
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp')
-rw-r--r-- | llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp index f862119c165..878f0a532b8 100644 --- a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp @@ -335,8 +335,8 @@ TEST(CoreAPIsTest, TestLookupWithUnthreadedMaterialization) { constexpr JITTargetAddress FakeFooAddr = 0xdeadbeef; JITEvaluatedSymbol FooSym(FakeFooAddr, JITSymbolFlags::Exported); - SymbolStringPool SSP; - auto Foo = SSP.intern("foo"); + ExecutionSession ES(std::make_shared<SymbolStringPool>()); + auto Foo = ES.getSymbolStringPool().intern("foo"); auto MU = llvm::make_unique<SimpleMaterializationUnit>( [=]() { @@ -355,7 +355,6 @@ TEST(CoreAPIsTest, TestLookupWithUnthreadedMaterialization) { cantFail(V.defineLazy(std::move(MU))); - ExecutionSession ES(SSP); auto FooLookupResult = cantFail(lookup({&V}, Foo, MaterializeOnCurrentThread(ES))); @@ -370,8 +369,8 @@ TEST(CoreAPIsTest, TestLookupWithThreadedMaterialization) { constexpr JITTargetAddress FakeFooAddr = 0xdeadbeef; JITEvaluatedSymbol FooSym(FakeFooAddr, JITSymbolFlags::Exported); - SymbolStringPool SSP; - auto Foo = SSP.intern("foo"); + ExecutionSession ES(std::make_shared<SymbolStringPool>()); + auto Foo = ES.getSymbolStringPool().intern("foo"); auto MU = llvm::make_unique<SimpleMaterializationUnit>( [=]() { @@ -390,8 +389,6 @@ TEST(CoreAPIsTest, TestLookupWithThreadedMaterialization) { cantFail(V.defineLazy(std::move(MU))); - ExecutionSession ES(SSP); - std::thread MaterializationThread; auto MaterializeOnNewThread = [&](VSO &V, std::unique_ptr<MaterializationUnit> MU) { |