summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/Orc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp3
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp11
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp5
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp3
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp12
5 files changed, 12 insertions, 22 deletions
diff --git a/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
index 4501b53c3c0..833b7621674 100644
--- a/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp
@@ -59,8 +59,7 @@ TEST(CompileOnDemandLayerTest, FindSymbol) {
DummyCallbackManager CallbackMgr;
- SymbolStringPool SSP;
- ExecutionSession ES(SSP);
+ ExecutionSession ES(std::make_shared<SymbolStringPool>());
auto GetResolver =
[](orc::VModuleKey) -> std::shared_ptr<llvm::orc::SymbolResolver> {
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) {
diff --git a/llvm/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp b/llvm/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp
index 6c7384a9af5..db29024f470 100644
--- a/llvm/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp
@@ -18,9 +18,8 @@ namespace {
TEST(LegacyAPIInteropTest, QueryAgainstVSO) {
- SymbolStringPool SP;
- ExecutionSession ES(SP);
- auto Foo = SP.intern("foo");
+ ExecutionSession ES(std::make_shared<SymbolStringPool>());
+ auto Foo = ES.getSymbolStringPool().intern("foo");
VSO V;
SymbolMap Defs;
diff --git a/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
index eacd3e0b0f9..6ad3c19ada9 100644
--- a/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
@@ -179,8 +179,7 @@ private:
TEST(ObjectTransformLayerTest, Main) {
MockBaseLayer M;
- SymbolStringPool SSP;
- ExecutionSession ES(SSP);
+ ExecutionSession ES(std::make_shared<SymbolStringPool>());
// Create one object transform layer using a transform (as a functor)
// that allocates new objects, and deals in unique pointers.
diff --git a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
index f52ee6b967e..650fd524812 100644
--- a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
@@ -67,8 +67,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestSetProcessAllSections) {
bool DebugSectionSeen = false;
auto MM = std::make_shared<MemoryManagerWrapper>(DebugSectionSeen);
- SymbolStringPool SSP;
- ExecutionSession ES(SSP);
+ ExecutionSession ES(std::make_shared<SymbolStringPool>());
RTDyldObjectLinkingLayer ObjLayer(ES, [&MM](VModuleKey) {
return RTDyldObjectLinkingLayer::Resources{
@@ -124,8 +123,7 @@ TEST_F(RTDyldObjectLinkingLayerExecutionTest, NoDuplicateFinalization) {
if (!SupportsJIT)
return;
- SymbolStringPool SSP;
- ExecutionSession ES(SSP);
+ ExecutionSession ES(std::make_shared<SymbolStringPool>());
auto MM = std::make_shared<SectionMemoryManagerWrapper>();
@@ -209,8 +207,7 @@ TEST_F(RTDyldObjectLinkingLayerExecutionTest, NoPrematureAllocation) {
if (!SupportsJIT)
return;
- SymbolStringPool SSP;
- ExecutionSession ES(SSP);
+ ExecutionSession ES(std::make_shared<SymbolStringPool>());
auto MM = std::make_shared<SectionMemoryManagerWrapper>();
@@ -271,8 +268,7 @@ TEST_F(RTDyldObjectLinkingLayerExecutionTest, NoPrematureAllocation) {
}
TEST_F(RTDyldObjectLinkingLayerExecutionTest, TestNotifyLoadedSignature) {
- SymbolStringPool SSP;
- ExecutionSession ES(SSP);
+ ExecutionSession ES(std::make_shared<SymbolStringPool>());
RTDyldObjectLinkingLayer ObjLayer(
ES,
[](VModuleKey) {
OpenPOWER on IntegriCloud