From 0eaee545eef49ff9498234d3a51a5cbde59bf976 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 15 Aug 2019 15:54:37 +0000 Subject: [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 --- .../ExecutionEngine/Orc/ThreadSafeModuleTest.cpp | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp') 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()); - auto M = llvm::make_unique("M", *TSCtx.getContext()); + ThreadSafeContext TSCtx(std::make_unique()); + auto M = std::make_unique("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()); + ThreadSafeContext TSCtx(std::make_unique()); - auto M1 = llvm::make_unique("M1", *TSCtx.getContext()); + auto M1 = std::make_unique("M1", *TSCtx.getContext()); ThreadSafeModule TSM1(std::move(M1), TSCtx); - auto M2 = llvm::make_unique("M2", *TSCtx.getContext()); + auto M2 = std::make_unique("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()); + ThreadSafeContext TSCtx(std::make_unique()); { // Create and destroy a module. - auto M1 = llvm::make_unique("M1", *TSCtx.getContext()); + auto M1 = std::make_unique("M1", *TSCtx.getContext()); ThreadSafeModule TSM1(std::move(M1), TSCtx); } // Verify that the context is still available for re-use. - auto M2 = llvm::make_unique("M2", *TSCtx.getContext()); + auto M2 = std::make_unique("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()); - auto M = llvm::make_unique("M", *TSCtx.getContext()); + ThreadSafeContext TSCtx(std::make_unique()); + auto M = std::make_unique("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()); - auto M = llvm::make_unique("M", *TSCtx.getContext()); + ThreadSafeContext TSCtx(std::make_unique()); + auto M = std::make_unique("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()); + ThreadSafeContext TSCtx(std::make_unique()); auto L = TSCtx.getLock(); auto &Ctx = *TSCtx.getContext(); - auto M = llvm::make_unique("M", Ctx); + auto M = std::make_unique("M", Ctx); TSCtx = ThreadSafeContext(); } -- cgit v1.2.3