summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ExecutionEngine')
-rw-r--r--llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp2
-rw-r--r--llvm/unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp6
-rw-r--r--llvm/unittests/ExecutionEngine/JITLink/MachO_x86_64_Tests.cpp2
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp52
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp2
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp4
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp2
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/QueueChannel.h4
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp12
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp28
10 files changed, 57 insertions, 57 deletions
diff --git a/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp b/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
index 77b1085a852..b92b3f6e984 100644
--- a/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
+++ b/llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp
@@ -27,7 +27,7 @@ private:
protected:
ExecutionEngineTest() {
- auto Owner = make_unique<Module>("<main>", Context);
+ auto Owner = std::make_unique<Module>("<main>", Context);
M = Owner.get();
Engine.reset(EngineBuilder(std::move(Owner)).setErrorStr(&Error).create());
}
diff --git a/llvm/unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp b/llvm/unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp
index b0c6d5b4481..23f8a691c8f 100644
--- a/llvm/unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp
+++ b/llvm/unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp
@@ -71,7 +71,7 @@ Error JITLinkTestCommon::TestResources::initializeTripleSpecifics(Triple &TT) {
if (!STI)
report_fatal_error("Could not build MCSubtargetInfo for triple");
- DisCtx = llvm::make_unique<MCContext>(MAI.get(), MRI.get(), nullptr);
+ DisCtx = std::make_unique<MCContext>(MAI.get(), MRI.get(), nullptr);
Dis.reset(TheTarget->createMCDisassembler(*STI, *DisCtx));
if (!Dis)
@@ -83,7 +83,7 @@ Error JITLinkTestCommon::TestResources::initializeTripleSpecifics(Triple &TT) {
void JITLinkTestCommon::TestResources::initializeTestSpecifics(
StringRef AsmSrc, const Triple &TT, bool PIC, bool LargeCodeModel) {
SrcMgr.AddNewSourceBuffer(MemoryBuffer::getMemBuffer(AsmSrc), SMLoc());
- AsCtx = llvm::make_unique<MCContext>(MAI.get(), MRI.get(), &MOFI, &SrcMgr);
+ AsCtx = std::make_unique<MCContext>(MAI.get(), MRI.get(), &MOFI, &SrcMgr);
MOFI.InitMCObjectFileInfo(TT, PIC, *AsCtx, LargeCodeModel);
std::unique_ptr<MCCodeEmitter> CE(
@@ -131,7 +131,7 @@ JITLinkTestCommon::TestJITLinkContext::setMemoryManager(
JITLinkMemoryManager &
JITLinkTestCommon::TestJITLinkContext::getMemoryManager() {
if (!MemMgr)
- MemMgr = llvm::make_unique<InProcessMemoryManager>();
+ MemMgr = std::make_unique<InProcessMemoryManager>();
return *MemMgr;
}
diff --git a/llvm/unittests/ExecutionEngine/JITLink/MachO_x86_64_Tests.cpp b/llvm/unittests/ExecutionEngine/JITLink/MachO_x86_64_Tests.cpp
index 98c5d44d466..e051ad551c7 100644
--- a/llvm/unittests/ExecutionEngine/JITLink/MachO_x86_64_Tests.cpp
+++ b/llvm/unittests/ExecutionEngine/JITLink/MachO_x86_64_Tests.cpp
@@ -39,7 +39,7 @@ public:
return;
}
- auto JTCtx = llvm::make_unique<TestJITLinkContext>(
+ auto JTCtx = std::make_unique<TestJITLinkContext>(
**TR, [&](AtomGraph &G) { RunGraphTest(G, (*TR)->getDisassembler()); });
JTCtx->externals() = std::move(Externals);
diff --git a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
index 375318c323f..d52ff4ba651 100644
--- a/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
@@ -37,7 +37,7 @@ TEST_F(CoreAPIsStandardTest, BasicSuccessfulLookup) {
std::shared_ptr<MaterializationResponsibility> FooMR;
- cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+ cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
[&](MaterializationResponsibility R) {
FooMR = std::make_shared<MaterializationResponsibility>(std::move(R));
@@ -105,7 +105,7 @@ TEST_F(CoreAPIsStandardTest, RemoveSymbolsTest) {
// Bar will be unmaterialized.
bool BarDiscarded = false;
bool BarMaterializerDestructed = false;
- cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+ cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
[this](MaterializationResponsibility R) {
ADD_FAILURE() << "Unexpected materialization of \"Bar\"";
@@ -122,7 +122,7 @@ TEST_F(CoreAPIsStandardTest, RemoveSymbolsTest) {
// Baz will be in the materializing state initially, then
// materialized for the final removal attempt.
Optional<MaterializationResponsibility> BazR;
- cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+ cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Baz, BazSym.getFlags()}}),
[&](MaterializationResponsibility R) { BazR.emplace(std::move(R)); },
[](const JITDylib &JD, const SymbolStringPtr &Name) {
@@ -217,7 +217,7 @@ TEST_F(CoreAPIsStandardTest, LookupFlagsTest) {
BarSym.setFlags(static_cast<JITSymbolFlags::FlagNames>(
JITSymbolFlags::Exported | JITSymbolFlags::Weak));
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
[](MaterializationResponsibility R) {
llvm_unreachable("Symbol materialized on flags lookup");
@@ -251,7 +251,7 @@ TEST_F(CoreAPIsStandardTest, LookupWithGeneratorFailure) {
}
};
- JD.addGenerator(llvm::make_unique<BadGenerator>());
+ JD.addGenerator(std::make_unique<BadGenerator>());
EXPECT_THAT_ERROR(JD.lookupFlags({Foo}).takeError(), Failed<StringError>())
<< "Generator failure did not propagate through lookupFlags";
@@ -314,7 +314,7 @@ TEST_F(CoreAPIsStandardTest, TestThatReExportsDontUnnecessarilyMaterialize) {
cantFail(JD.define(absoluteSymbols({{Foo, FooSym}})));
bool BarMaterialized = false;
- auto BarMU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto BarMU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R) {
BarMaterialized = true;
@@ -344,7 +344,7 @@ TEST_F(CoreAPIsStandardTest, TestReexportsGenerator) {
auto Filter = [this](SymbolStringPtr Name) { return Name != Bar; };
- JD.addGenerator(llvm::make_unique<ReexportsGenerator>(JD2, false, Filter));
+ JD.addGenerator(std::make_unique<ReexportsGenerator>(JD2, false, Filter));
auto Flags = cantFail(JD.lookupFlags({Foo, Bar, Baz}));
EXPECT_EQ(Flags.size(), 1U) << "Unexpected number of results";
@@ -358,7 +358,7 @@ TEST_F(CoreAPIsStandardTest, TestReexportsGenerator) {
TEST_F(CoreAPIsStandardTest, TestTrivialCircularDependency) {
Optional<MaterializationResponsibility> FooR;
- auto FooMU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto FooMU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
[&](MaterializationResponsibility R) { FooR.emplace(std::move(R)); });
@@ -394,15 +394,15 @@ TEST_F(CoreAPIsStandardTest, TestCircularDependenceInOneJITDylib) {
// Create a MaterializationUnit for each symbol that moves the
// MaterializationResponsibility into one of the locals above.
- auto FooMU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto FooMU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
[&](MaterializationResponsibility R) { FooR.emplace(std::move(R)); });
- auto BarMU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto BarMU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R) { BarR.emplace(std::move(R)); });
- auto BazMU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto BazMU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Baz, BazSym.getFlags()}}),
[&](MaterializationResponsibility R) { BazR.emplace(std::move(R)); });
@@ -524,7 +524,7 @@ TEST_F(CoreAPIsStandardTest, DropMaterializerWhenEmpty) {
JITSymbolFlags WeakExported(JITSymbolFlags::Exported);
WeakExported |= JITSymbolFlags::Weak;
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, WeakExported}, {Bar, WeakExported}}),
[](MaterializationResponsibility R) {
llvm_unreachable("Unexpected call to materialize");
@@ -555,7 +555,7 @@ TEST_F(CoreAPIsStandardTest, AddAndMaterializeLazySymbol) {
JITSymbolFlags WeakExported(JITSymbolFlags::Exported);
WeakExported |= JITSymbolFlags::Weak;
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, JITSymbolFlags::Exported}, {Bar, WeakExported}}),
[&](MaterializationResponsibility R) {
assert(BarDiscarded && "Bar should have been discarded by this point");
@@ -597,7 +597,7 @@ TEST_F(CoreAPIsStandardTest, TestBasicWeakSymbolMaterialization) {
BarSym.setFlags(BarSym.getFlags() | JITSymbolFlags::Weak);
bool BarMaterialized = false;
- auto MU1 = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU1 = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R) {
R.notifyResolved(SymbolMap({{Foo, FooSym}, {Bar, BarSym}})), R.notifyEmitted();
@@ -605,7 +605,7 @@ TEST_F(CoreAPIsStandardTest, TestBasicWeakSymbolMaterialization) {
});
bool DuplicateBarDiscarded = false;
- auto MU2 = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU2 = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R) {
ADD_FAILURE() << "Attempt to materialize Bar from the wrong unit";
@@ -644,7 +644,7 @@ TEST_F(CoreAPIsStandardTest, DefineMaterializingSymbol) {
MU->doMaterialize(JD);
});
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
[&](MaterializationResponsibility R) {
cantFail(
@@ -690,7 +690,7 @@ TEST_F(CoreAPIsStandardTest, GeneratorTest) {
SymbolMap Symbols;
};
- JD.addGenerator(llvm::make_unique<TestGenerator>(SymbolMap({{Bar, BarSym}})));
+ JD.addGenerator(std::make_unique<TestGenerator>(SymbolMap({{Bar, BarSym}})));
auto Result =
cantFail(ES.lookup(JITDylibSearchList({{&JD, false}}), {Foo, Bar}));
@@ -701,7 +701,7 @@ TEST_F(CoreAPIsStandardTest, GeneratorTest) {
}
TEST_F(CoreAPIsStandardTest, FailResolution) {
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, JITSymbolFlags::Exported | JITSymbolFlags::Weak},
{Bar, JITSymbolFlags::Exported | JITSymbolFlags::Weak}}),
[&](MaterializationResponsibility R) {
@@ -737,7 +737,7 @@ TEST_F(CoreAPIsStandardTest, FailEmissionEarly) {
cantFail(JD.define(absoluteSymbols({{Baz, BazSym}})));
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R) {
R.notifyResolved(SymbolMap({{Foo, FooSym}, {Bar, BarSym}}));
@@ -769,7 +769,7 @@ TEST_F(CoreAPIsStandardTest, FailEmissionEarly) {
}
TEST_F(CoreAPIsStandardTest, TestLookupWithUnthreadedMaterialization) {
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, JITSymbolFlags::Exported}}),
[&](MaterializationResponsibility R) {
R.notifyResolved({{Foo, FooSym}});
@@ -821,14 +821,14 @@ TEST_F(CoreAPIsStandardTest, TestGetRequestedSymbolsAndReplace) {
bool FooMaterialized = false;
bool BarMaterialized = false;
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R) {
auto Requested = R.getRequestedSymbols();
EXPECT_EQ(Requested.size(), 1U) << "Expected one symbol requested";
EXPECT_EQ(*Requested.begin(), Foo) << "Expected \"Foo\" requested";
- auto NewMU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto NewMU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R2) {
R2.notifyResolved(SymbolMap({{Bar, BarSym}}));
@@ -865,7 +865,7 @@ TEST_F(CoreAPIsStandardTest, TestGetRequestedSymbolsAndReplace) {
}
TEST_F(CoreAPIsStandardTest, TestMaterializationResponsibilityDelegation) {
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}, {Bar, BarSym.getFlags()}}),
[&](MaterializationResponsibility R) {
auto R2 = R.delegate({Bar});
@@ -896,11 +896,11 @@ TEST_F(CoreAPIsStandardTest, TestMaterializeWeakSymbol) {
WeakExported &= JITSymbolFlags::Weak;
std::unique_ptr<MaterializationResponsibility> FooResponsibility;
- auto MU = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, FooSym.getFlags()}}),
[&](MaterializationResponsibility R) {
FooResponsibility =
- llvm::make_unique<MaterializationResponsibility>(std::move(R));
+ std::make_unique<MaterializationResponsibility>(std::move(R));
});
cantFail(JD.define(MU));
@@ -911,7 +911,7 @@ TEST_F(CoreAPIsStandardTest, TestMaterializeWeakSymbol) {
ES.lookup(JITDylibSearchList({{&JD, false}}), {Foo}, SymbolState::Ready,
std::move(OnCompletion), NoDependenciesToRegister);
- auto MU2 = llvm::make_unique<SimpleMaterializationUnit>(
+ auto MU2 = std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{Foo, JITSymbolFlags::Exported}}),
[](MaterializationResponsibility R) {
llvm_unreachable("This unit should never be materialized");
diff --git a/llvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp b/llvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
index 87d582b3c27..d4757e0f86e 100644
--- a/llvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/LazyCallThroughAndReexportsTest.cpp
@@ -37,7 +37,7 @@ TEST_F(LazyReexportsTest, BasicLocalCallThroughManagerOperation) {
bool DummyTargetMaterialized = false;
- cantFail(JD.define(llvm::make_unique<SimpleMaterializationUnit>(
+ cantFail(JD.define(std::make_unique<SimpleMaterializationUnit>(
SymbolFlagsMap({{DummyTarget, JITSymbolFlags::Exported}}),
[&](MaterializationResponsibility R) {
DummyTargetMaterialized = true;
diff --git a/llvm/unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp
index 06b96f9fd38..59cd11c5e5a 100644
--- a/llvm/unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp
@@ -25,7 +25,7 @@ public:
class DummyCallbackManager : public JITCompileCallbackManager {
public:
DummyCallbackManager(ExecutionSession &ES)
- : JITCompileCallbackManager(llvm::make_unique<DummyTrampolinePool>(), ES,
+ : JITCompileCallbackManager(std::make_unique<DummyTrampolinePool>(), ES,
0) {}
};
@@ -78,7 +78,7 @@ TEST(LegacyCompileOnDemandLayerTest, FindSymbol) {
llvm::orc::LegacyCompileOnDemandLayer<decltype(TestBaseLayer)> COD(
AcknowledgeORCv1Deprecation, ES, TestBaseLayer, GetResolver, SetResolver,
[](Function &F) { return std::set<Function *>{&F}; }, CallbackMgr,
- [] { return llvm::make_unique<DummyStubsManager>(); }, true);
+ [] { return std::make_unique<DummyStubsManager>(); }, true);
auto Sym = COD.findSymbol("foo", true);
diff --git a/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
index 001019daa4b..3f0f85b69a7 100644
--- a/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
@@ -75,7 +75,7 @@ TEST(LegacyRTDyldObjectLinkingLayerTest, TestSetProcessAllSections) {
});
LLVMContext Context;
- auto M = llvm::make_unique<Module>("", Context);
+ auto M = std::make_unique<Module>("", Context);
M->setTargetTriple("x86_64-unknown-linux-gnu");
Type *Int32Ty = IntegerType::get(Context, 32);
GlobalVariable *GV =
diff --git a/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h b/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h
index 56a3926ee65..511f038dec1 100644
--- a/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h
+++ b/llvm/unittests/ExecutionEngine/Orc/QueueChannel.h
@@ -135,8 +135,8 @@ inline std::pair<std::unique_ptr<QueueChannel>, std::unique_ptr<QueueChannel>>
createPairedQueueChannels() {
auto Q1 = std::make_shared<Queue>();
auto Q2 = std::make_shared<Queue>();
- auto C1 = llvm::make_unique<QueueChannel>(Q1, Q2);
- auto C2 = llvm::make_unique<QueueChannel>(Q2, Q1);
+ auto C1 = std::make_unique<QueueChannel>(Q1, Q2);
+ auto C2 = std::make_unique<QueueChannel>(Q2, Q1);
return std::make_pair(std::move(C1), std::move(C2));
}
diff --git a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
index 440b840faaa..ecb8cf65393 100644
--- a/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
@@ -54,7 +54,7 @@ static bool testSetProcessAllSections(std::unique_ptr<MemoryBuffer> Obj,
auto Foo = ES.intern("foo");
RTDyldObjectLinkingLayer ObjLayer(ES, [&DebugSectionSeen]() {
- return llvm::make_unique<MemoryManagerWrapper>(DebugSectionSeen);
+ return std::make_unique<MemoryManagerWrapper>(DebugSectionSeen);
});
auto OnResolveDoNothing = [](Expected<SymbolMap> R) {
@@ -71,7 +71,7 @@ static bool testSetProcessAllSections(std::unique_ptr<MemoryBuffer> Obj,
TEST(RTDyldObjectLinkingLayerTest, TestSetProcessAllSections) {
LLVMContext Context;
- auto M = llvm::make_unique<Module>("", Context);
+ auto M = std::make_unique<Module>("", Context);
M->setTargetTriple("x86_64-unknown-linux-gnu");
Type *Int32Ty = IntegerType::get(Context, 32);
GlobalVariable *GV =
@@ -123,7 +123,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestOverrideObjectFlags) {
};
// Create a module with two void() functions: foo and bar.
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
ThreadSafeModule M;
{
ModuleBuilder MB(*TSCtx.getContext(), TM->getTargetTriple().str(), "dummy");
@@ -153,7 +153,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestOverrideObjectFlags) {
auto &JD = ES.createJITDylib("main");
auto Foo = ES.intern("foo");
RTDyldObjectLinkingLayer ObjLayer(
- ES, []() { return llvm::make_unique<SectionMemoryManager>(); });
+ ES, []() { return std::make_unique<SectionMemoryManager>(); });
IRCompileLayer CompileLayer(ES, ObjLayer, FunkySimpleCompiler(*TM));
ObjLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);
@@ -196,7 +196,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestAutoClaimResponsibilityForSymbols) {
};
// Create a module with two void() functions: foo and bar.
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
ThreadSafeModule M;
{
ModuleBuilder MB(*TSCtx.getContext(), TM->getTargetTriple().str(), "dummy");
@@ -218,7 +218,7 @@ TEST(RTDyldObjectLinkingLayerTest, TestAutoClaimResponsibilityForSymbols) {
auto &JD = ES.createJITDylib("main");
auto Foo = ES.intern("foo");
RTDyldObjectLinkingLayer ObjLayer(
- ES, []() { return llvm::make_unique<SectionMemoryManager>(); });
+ ES, []() { return std::make_unique<SectionMemoryManager>(); });
IRCompileLayer CompileLayer(ES, ObjLayer, FunkySimpleCompiler(*TM));
ObjLayer.setAutoClaimResponsibilityForObjectSymbols(true);
diff --git a/llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp b/llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
index b50c5f99707..1ffb06db659 100644
--- a/llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
+++ b/llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
@@ -21,36 +21,36 @@ namespace {
TEST(ThreadSafeModuleTest, ContextWhollyOwnedByOneModule) {
// Test that ownership of a context can be transferred to a single
// ThreadSafeModule.
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
- auto M = llvm::make_unique<Module>("M", *TSCtx.getContext());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
+ auto M = std::make_unique<Module>("M", *TSCtx.getContext());
ThreadSafeModule TSM(std::move(M), std::move(TSCtx));
}
TEST(ThreadSafeModuleTest, ContextOwnershipSharedByTwoModules) {
// Test that ownership of a context can be shared between more than one
// ThreadSafeModule.
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
- auto M1 = llvm::make_unique<Module>("M1", *TSCtx.getContext());
+ auto M1 = std::make_unique<Module>("M1", *TSCtx.getContext());
ThreadSafeModule TSM1(std::move(M1), TSCtx);
- auto M2 = llvm::make_unique<Module>("M2", *TSCtx.getContext());
+ auto M2 = std::make_unique<Module>("M2", *TSCtx.getContext());
ThreadSafeModule TSM2(std::move(M2), std::move(TSCtx));
}
TEST(ThreadSafeModuleTest, ContextOwnershipSharedWithClient) {
// Test that ownership of a context can be shared with a client-held
// ThreadSafeContext so that it can be re-used for new modules.
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
{
// Create and destroy a module.
- auto M1 = llvm::make_unique<Module>("M1", *TSCtx.getContext());
+ auto M1 = std::make_unique<Module>("M1", *TSCtx.getContext());
ThreadSafeModule TSM1(std::move(M1), TSCtx);
}
// Verify that the context is still available for re-use.
- auto M2 = llvm::make_unique<Module>("M2", *TSCtx.getContext());
+ auto M2 = std::make_unique<Module>("M2", *TSCtx.getContext());
ThreadSafeModule TSM2(std::move(M2), std::move(TSCtx));
}
@@ -58,16 +58,16 @@ TEST(ThreadSafeModuleTest, ThreadSafeModuleMoveAssignment) {
// Move assignment needs to move the module before the context (opposite
// to the field order) to ensure that overwriting with an empty
// ThreadSafeModule does not destroy the context early.
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
- auto M = llvm::make_unique<Module>("M", *TSCtx.getContext());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
+ auto M = std::make_unique<Module>("M", *TSCtx.getContext());
ThreadSafeModule TSM(std::move(M), std::move(TSCtx));
TSM = ThreadSafeModule();
}
TEST(ThreadSafeModuleTest, BasicContextLockAPI) {
// Test that basic lock API calls work.
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
- auto M = llvm::make_unique<Module>("M", *TSCtx.getContext());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
+ auto M = std::make_unique<Module>("M", *TSCtx.getContext());
ThreadSafeModule TSM(std::move(M), TSCtx);
{ auto L = TSCtx.getLock(); }
@@ -84,10 +84,10 @@ TEST(ThreadSafeModuleTest, ContextLockPreservesContext) {
// has been destroyed) even though all references to the context have
// been thrown away (apart from the lock).
- ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>());
+ ThreadSafeContext TSCtx(std::make_unique<LLVMContext>());
auto L = TSCtx.getLock();
auto &Ctx = *TSCtx.getContext();
- auto M = llvm::make_unique<Module>("M", Ctx);
+ auto M = std::make_unique<Module>("M", Ctx);
TSCtx = ThreadSafeContext();
}
OpenPOWER on IntegriCloud