diff options
Diffstat (limited to 'llvm/docs/ORCv2.rst')
-rw-r--r-- | llvm/docs/ORCv2.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/docs/ORCv2.rst b/llvm/docs/ORCv2.rst index ba4534e6215..edb1695f4e3 100644 --- a/llvm/docs/ORCv2.rst +++ b/llvm/docs/ORCv2.rst @@ -174,7 +174,7 @@ checking omitted for brevity) as: ExecutionSession ES; RTDyldObjectLinkingLayer ObjLinkingLayer( - ES, []() { return llvm::make_unique<SectionMemoryManager>(); }); + ES, []() { return std::make_unique<SectionMemoryManager>(); }); CXXCompileLayer CXXLayer(ES, ObjLinkingLayer); // Create JITDylib "A" and add code to it using the CXX layer. @@ -453,7 +453,7 @@ std::unique_ptr<LLVMContext>: .. code-block:: c++ - ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>()); + ThreadSafeContext TSCtx(std::make_unique<LLVMContext>()); ThreadSafeModules can be constructed from a pair of a std::unique_ptr<Module> and a ThreadSafeContext value. ThreadSafeContext values may be shared between @@ -462,10 +462,10 @@ multiple ThreadSafeModules: .. code-block:: c++ ThreadSafeModule TSM1( - llvm::make_unique<Module>("M1", *TSCtx.getContext()), TSCtx); + std::make_unique<Module>("M1", *TSCtx.getContext()), TSCtx); ThreadSafeModule TSM2( - llvm::make_unique<Module>("M2", *TSCtx.getContext()), TSCtx); + std::make_unique<Module>("M2", *TSCtx.getContext()), TSCtx); Before using a ThreadSafeContext, clients should ensure that either the context is only accessible on the current thread, or that the context is locked. In the @@ -476,7 +476,7 @@ or creating any Modules attached to it. E.g. .. code-block:: c++ - ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>()); + ThreadSafeContext TSCtx(std::make_unique<LLVMContext>()); ThreadPool TP(NumThreads); JITStack J; @@ -519,8 +519,8 @@ constructs a new ThreadSafeContext value from a std::unique_ptr<LLVMContext>: // Maximize concurrency opportunities by loading every module on a // separate context. for (const auto &IRPath : IRPaths) { - auto Ctx = llvm::make_unique<LLVMContext>(); - auto M = llvm::make_unique<LLVMContext>("M", *Ctx); + auto Ctx = std::make_unique<LLVMContext>(); + auto M = std::make_unique<LLVMContext>("M", *Ctx); CompileLayer.add(ES.getMainJITDylib(), ThreadSafeModule(std::move(M), std::move(Ctx))); } @@ -531,7 +531,7 @@ all modules on the same context: .. code-block:: c++ // Save memory by using one context for all Modules: - ThreadSafeContext TSCtx(llvm::make_unique<LLVMContext>()); + ThreadSafeContext TSCtx(std::make_unique<LLVMContext>()); for (const auto &IRPath : IRPaths) { ThreadSafeModule TSM(parsePath(IRPath, *TSCtx.getContext()), TSCtx); CompileLayer.add(ES.getMainJITDylib(), ThreadSafeModule(std::move(TSM)); |