summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-15 15:54:37 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-15 15:54:37 +0000
commit0eaee545eef49ff9498234d3a51a5cbde59bf976 (patch)
treefd7691e102022fb97622c5485fa8c4f506fc124e /llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
parent1c34d10776828c0756ff4f0b2b9aa8bda2be348a (diff)
downloadbcm5719-llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.tar.gz
bcm5719-llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.zip
[llvm] Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp28
1 files changed, 14 insertions, 14 deletions
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