diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine')
18 files changed, 47 insertions, 47 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index 75ac80f4b75..a425c612108 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -340,14 +340,14 @@ void *ArgvArray::reset(LLVMContext &C, ExecutionEngine *EE, Values.clear(); // Free the old contents. Values.reserve(InputArgv.size()); unsigned PtrSize = EE->getDataLayout().getPointerSize(); - Array = make_unique<char[]>((InputArgv.size()+1)*PtrSize); + Array = std::make_unique<char[]>((InputArgv.size()+1)*PtrSize); LLVM_DEBUG(dbgs() << "JIT: ARGV = " << (void *)Array.get() << "\n"); Type *SBytePtr = Type::getInt8PtrTy(C); for (unsigned i = 0; i != InputArgv.size(); ++i) { unsigned Size = InputArgv[i].size()+1; - auto Dest = make_unique<char[]>(Size); + auto Dest = std::make_unique<char[]>(Size); LLVM_DEBUG(dbgs() << "JIT: ARGV[" << i << "] = " << (void *)Dest.get() << "\n"); diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h index e6fd6e38f7a..eeb2527bd1b 100644 --- a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h +++ b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h @@ -121,7 +121,7 @@ public: /// Link should be called with the constructor arguments for LinkerImpl, which /// will be forwarded to the constructor. template <typename... ArgTs> static void link(ArgTs &&... Args) { - auto L = llvm::make_unique<LinkerImpl>(std::forward<ArgTs>(Args)...); + auto L = std::make_unique<LinkerImpl>(std::forward<ArgTs>(Args)...); // Ownership of the linker is passed into the linker's doLink function to // allow it to be passed on to async continuations. diff --git a/llvm/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp b/llvm/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp index 92c7e49039a..c1040c942b2 100644 --- a/llvm/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/MachOAtomGraphBuilder.cpp @@ -34,7 +34,7 @@ Expected<std::unique_ptr<AtomGraph>> MachOAtomGraphBuilder::buildGraph() { MachOAtomGraphBuilder::MachOAtomGraphBuilder(const object::MachOObjectFile &Obj) : Obj(Obj), - G(llvm::make_unique<AtomGraph>(Obj.getFileName(), getPointerSize(Obj), + G(std::make_unique<AtomGraph>(Obj.getFileName(), getPointerSize(Obj), getEndianness(Obj))) {} void MachOAtomGraphBuilder::addCustomAtomizer(StringRef SectionName, diff --git a/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp b/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp index 2ad9d24555f..bb5d96051da 100644 --- a/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp +++ b/llvm/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp @@ -177,7 +177,7 @@ void OProfileJITEventListener::notifyFreeingObject(ObjectKey Key) { namespace llvm { JITEventListener *JITEventListener::createOProfileJITEventListener() { - return new OProfileJITEventListener(llvm::make_unique<OProfileWrapper>()); + return new OProfileJITEventListener(std::make_unique<OProfileWrapper>()); } } // namespace llvm diff --git a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp index a91dd4e796e..75ddbc30445 100644 --- a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp @@ -155,7 +155,7 @@ void CompileOnDemandLayer::emit(MaterializationResponsibility R, // Create a partitioning materialization unit and lodge it with the // implementation dylib. if (auto Err = PDR.getImplDylib().define( - llvm::make_unique<PartitioningIRMaterializationUnit>( + std::make_unique<PartitioningIRMaterializationUnit>( ES, std::move(TSM), R.getVModuleKey(), *this))) { ES.reportError(std::move(Err)); R.failMaterialization(); @@ -267,7 +267,7 @@ void CompileOnDemandLayer::emitPartition( // If the partition is empty, return the whole module to the symbol table. if (GVsToExtract->empty()) { - R.replace(llvm::make_unique<PartitioningIRMaterializationUnit>( + R.replace(std::make_unique<PartitioningIRMaterializationUnit>( std::move(TSM), R.getSymbols(), std::move(Defs), *this)); return; } @@ -310,7 +310,7 @@ void CompileOnDemandLayer::emitPartition( return; } - R.replace(llvm::make_unique<PartitioningIRMaterializationUnit>( + R.replace(std::make_unique<PartitioningIRMaterializationUnit>( ES, std::move(TSM), R.getVModuleKey(), *this)); BaseLayer.emit(std::move(R), std::move(*ExtractedTSM)); } diff --git a/llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp b/llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp index d46b6fcf9a5..f8251627a4e 100644 --- a/llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp @@ -42,7 +42,7 @@ SimpleCompiler::CompileResult SimpleCompiler::operator()(Module &M) { PM.run(M); } - auto ObjBuffer = llvm::make_unique<SmallVectorMemoryBuffer>( + auto ObjBuffer = std::make_unique<SmallVectorMemoryBuffer>( std::move(ObjBufferSV), "<in memory object compiled from " + M.getModuleIdentifier() + ">"); diff --git a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp index 044e7eede08..990fc1342d5 100644 --- a/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp @@ -186,7 +186,7 @@ DynamicLibrarySearchGenerator::Load(const char *FileName, char GlobalPrefix, auto Lib = sys::DynamicLibrary::getPermanentLibrary(FileName, &ErrMsg); if (!Lib.isValid()) return make_error<StringError>(std::move(ErrMsg), inconvertibleErrorCode()); - return llvm::make_unique<DynamicLibrarySearchGenerator>( + return std::make_unique<DynamicLibrarySearchGenerator>( std::move(Lib), GlobalPrefix, std::move(Allow)); } diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index cc3656fe5dc..382a6a2951c 100644 --- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -66,7 +66,7 @@ JITCompileCallbackManager::getCompileCallback(CompileFunction Compile) { std::lock_guard<std::mutex> Lock(CCMgrMutex); AddrToSymbol[*TrampolineAddr] = CallbackName; cantFail(CallbacksJD.define( - llvm::make_unique<CompileCallbackMaterializationUnit>( + std::make_unique<CompileCallbackMaterializationUnit>( std::move(CallbackName), std::move(Compile), ES.allocateVModule()))); return *TrampolineAddr; @@ -162,50 +162,50 @@ createLocalIndirectStubsManagerBuilder(const Triple &T) { switch (T.getArch()) { default: return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcGenericABI>>(); }; case Triple::aarch64: return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcAArch64>>(); }; case Triple::x86: return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcI386>>(); }; case Triple::mips: return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcMips32Be>>(); }; case Triple::mipsel: return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcMips32Le>>(); }; case Triple::mips64: case Triple::mips64el: return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcMips64>>(); }; case Triple::x86_64: if (T.getOS() == Triple::OSType::Win32) { return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcX86_64_Win32>>(); }; } else { return [](){ - return llvm::make_unique< + return std::make_unique< orc::LocalIndirectStubsManager<orc::OrcX86_64_SysV>>(); }; } diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp index 05ebb746985..a80f78afe80 100644 --- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp +++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp @@ -68,9 +68,9 @@ LLJIT::createObjectLinkingLayer(LLJITBuilderState &S, ExecutionSession &ES) { // Otherwise default to creating an RTDyldObjectLinkingLayer that constructs // a new SectionMemoryManager for each object. - auto GetMemMgr = []() { return llvm::make_unique<SectionMemoryManager>(); }; + auto GetMemMgr = []() { return std::make_unique<SectionMemoryManager>(); }; auto ObjLinkingLayer = - llvm::make_unique<RTDyldObjectLinkingLayer>(ES, std::move(GetMemMgr)); + std::make_unique<RTDyldObjectLinkingLayer>(ES, std::move(GetMemMgr)); if (S.JTMB->getTargetTriple().isOSBinFormatCOFF()) ObjLinkingLayer->setOverrideObjectFlagsWithResponsibilityFlags(true); @@ -102,7 +102,7 @@ LLJIT::createCompileFunction(LLJITBuilderState &S, } LLJIT::LLJIT(LLJITBuilderState &S, Error &Err) - : ES(S.ES ? std::move(S.ES) : llvm::make_unique<ExecutionSession>()), + : ES(S.ES ? std::move(S.ES) : std::make_unique<ExecutionSession>()), Main(this->ES->getMainJITDylib()), DL(""), CtorRunner(Main), DtorRunner(Main) { @@ -123,13 +123,13 @@ LLJIT::LLJIT(LLJITBuilderState &S, Error &Err) Err = CompileFunction.takeError(); return; } - CompileLayer = llvm::make_unique<IRCompileLayer>( + CompileLayer = std::make_unique<IRCompileLayer>( *ES, *ObjLinkingLayer, std::move(*CompileFunction)); } if (S.NumCompileThreads > 0) { CompileLayer->setCloneToNewContextOnEmit(true); - CompileThreads = llvm::make_unique<ThreadPool>(S.NumCompileThreads); + CompileThreads = std::make_unique<ThreadPool>(S.NumCompileThreads); ES->setDispatchMaterialization( [this](JITDylib &JD, std::unique_ptr<MaterializationUnit> MU) { // FIXME: Switch to move capture once we have c++14. @@ -226,10 +226,10 @@ LLLazyJIT::LLLazyJIT(LLLazyJITBuilderState &S, Error &Err) : LLJIT(S, Err) { } // Create the transform layer. - TransformLayer = llvm::make_unique<IRTransformLayer>(*ES, *CompileLayer); + TransformLayer = std::make_unique<IRTransformLayer>(*ES, *CompileLayer); // Create the COD layer. - CODLayer = llvm::make_unique<CompileOnDemandLayer>( + CODLayer = std::make_unique<CompileOnDemandLayer>( *ES, *TransformLayer, *LCTMgr, std::move(ISMBuilder)); if (S.NumCompileThreads > 0) diff --git a/llvm/lib/ExecutionEngine/Orc/Layer.cpp b/llvm/lib/ExecutionEngine/Orc/Layer.cpp index 2126ecb0733..ba2ec32da78 100644 --- a/llvm/lib/ExecutionEngine/Orc/Layer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/Layer.cpp @@ -19,7 +19,7 @@ IRLayer::IRLayer(ExecutionSession &ES) : ES(ES) {} IRLayer::~IRLayer() {} Error IRLayer::add(JITDylib &JD, ThreadSafeModule TSM, VModuleKey K) { - return JD.define(llvm::make_unique<BasicIRLayerMaterializationUnit>( + return JD.define(std::make_unique<BasicIRLayerMaterializationUnit>( *this, std::move(K), std::move(TSM))); } diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp index def0b300eca..ff9b55dbbcb 100644 --- a/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp @@ -330,7 +330,7 @@ ObjectLinkingLayer::~ObjectLinkingLayer() { void ObjectLinkingLayer::emit(MaterializationResponsibility R, std::unique_ptr<MemoryBuffer> O) { assert(O && "Object must not be null"); - jitLink(llvm::make_unique<ObjectLinkingLayerJITLinkContext>( + jitLink(std::make_unique<ObjectLinkingLayerJITLinkContext>( *this, std::move(R), std::move(O))); } diff --git a/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h b/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h index 21b65bdd66d..e0af3df9d01 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h +++ b/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h @@ -97,7 +97,7 @@ public: template <typename LayerT> std::unique_ptr<GenericLayerImpl<LayerT>> createGenericLayer(LayerT &Layer) { - return llvm::make_unique<GenericLayerImpl<LayerT>>(Layer); + return std::make_unique<GenericLayerImpl<LayerT>>(Layer); } } // end namespace detail @@ -327,7 +327,7 @@ public: LLVMOrcSymbolResolverFn ExternalResolver, void *ExternalResolverCtx) { return addIRModule(CompileLayer, std::move(M), - llvm::make_unique<SectionMemoryManager>(), + std::make_unique<SectionMemoryManager>(), std::move(ExternalResolver), ExternalResolverCtx); } @@ -341,7 +341,7 @@ public: inconvertibleErrorCode()); return addIRModule(*CODLayer, std::move(M), - llvm::make_unique<SectionMemoryManager>(), + std::make_unique<SectionMemoryManager>(), std::move(ExternalResolver), ExternalResolverCtx); } @@ -469,7 +469,7 @@ private: if (!CCMgr) return nullptr; - return llvm::make_unique<CODLayerT>( + return std::make_unique<CODLayerT>( AcknowledgeORCv1Deprecation, ES, CompileLayer, [&Resolvers](orc::VModuleKey K) { auto ResolverI = Resolvers.find(K); diff --git a/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp b/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp index 14419b6ca18..1f4e6f13211 100644 --- a/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ThreadSafeModule.cpp @@ -51,7 +51,7 @@ ThreadSafeModule cloneToNewContext(ThreadSafeModule &TSM, MemoryBufferRef ClonedModuleBufferRef( StringRef(ClonedModuleBuffer.data(), ClonedModuleBuffer.size()), "cloned module buffer"); - ThreadSafeContext NewTSCtx(llvm::make_unique<LLVMContext>()); + ThreadSafeContext NewTSCtx(std::make_unique<LLVMContext>()); auto ClonedModule = cantFail( parseBitcodeFile(ClonedModuleBufferRef, *NewTSCtx.getContext())); diff --git a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp index 5a898d96d7d..184388dc4d7 100644 --- a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp +++ b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp @@ -203,7 +203,7 @@ PerfJITEventListener::PerfJITEventListener() : Pid(::getpid()) { return; } - Dumpstream = make_unique<raw_fd_ostream>(DumpFd, true); + Dumpstream = std::make_unique<raw_fd_ostream>(DumpFd, true); LLVMPerfJitHeader Header = {0}; if (!FillMachine(Header)) diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp index d4e3b0ba767..27a7690db34 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp @@ -50,18 +50,18 @@ llvm::RuntimeDyldCOFF::create(Triple::ArchType Arch, switch (Arch) { default: llvm_unreachable("Unsupported target for RuntimeDyldCOFF."); case Triple::x86: - return make_unique<RuntimeDyldCOFFI386>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldCOFFI386>(MemMgr, Resolver); case Triple::thumb: - return make_unique<RuntimeDyldCOFFThumb>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldCOFFThumb>(MemMgr, Resolver); case Triple::x86_64: - return make_unique<RuntimeDyldCOFFX86_64>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldCOFFX86_64>(MemMgr, Resolver); } } std::unique_ptr<RuntimeDyld::LoadedObjectInfo> RuntimeDyldCOFF::loadObject(const object::ObjectFile &O) { if (auto ObjSectionToIDOrErr = loadObjectImpl(O)) { - return llvm::make_unique<LoadedCOFFObjectInfo>(*this, *ObjSectionToIDOrErr); + return std::make_unique<LoadedCOFFObjectInfo>(*this, *ObjSectionToIDOrErr); } else { HasError = true; raw_string_ostream ErrStream(ErrorStr); diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp index ec31ea4e573..b9c5a12e08d 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp @@ -851,7 +851,7 @@ RuntimeDyldChecker::RuntimeDyldChecker( GetGOTInfoFunction GetGOTInfo, support::endianness Endianness, MCDisassembler *Disassembler, MCInstPrinter *InstPrinter, raw_ostream &ErrStream) - : Impl(::llvm::make_unique<RuntimeDyldCheckerImpl>( + : Impl(::std::make_unique<RuntimeDyldCheckerImpl>( std::move(IsSymbolValid), std::move(GetSymbolInfo), std::move(GetSectionInfo), std::move(GetStubInfo), std::move(GetGOTInfo), Endianness, Disassembler, InstPrinter, diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index e3ace265f9c..8de3f7ef467 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -242,19 +242,19 @@ llvm::RuntimeDyldELF::create(Triple::ArchType Arch, JITSymbolResolver &Resolver) { switch (Arch) { default: - return make_unique<RuntimeDyldELF>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldELF>(MemMgr, Resolver); case Triple::mips: case Triple::mipsel: case Triple::mips64: case Triple::mips64el: - return make_unique<RuntimeDyldELFMips>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldELFMips>(MemMgr, Resolver); } } std::unique_ptr<RuntimeDyld::LoadedObjectInfo> RuntimeDyldELF::loadObject(const object::ObjectFile &O) { if (auto ObjSectionToIDOrErr = loadObjectImpl(O)) - return llvm::make_unique<LoadedELFObjectInfo>(*this, *ObjSectionToIDOrErr); + return std::make_unique<LoadedELFObjectInfo>(*this, *ObjSectionToIDOrErr); else { HasError = true; raw_string_ostream ErrStream(ErrorStr); diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index fbdfb8d5c3a..a6a818601c6 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -354,20 +354,20 @@ RuntimeDyldMachO::create(Triple::ArchType Arch, llvm_unreachable("Unsupported target for RuntimeDyldMachO."); break; case Triple::arm: - return make_unique<RuntimeDyldMachOARM>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldMachOARM>(MemMgr, Resolver); case Triple::aarch64: - return make_unique<RuntimeDyldMachOAArch64>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldMachOAArch64>(MemMgr, Resolver); case Triple::x86: - return make_unique<RuntimeDyldMachOI386>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldMachOI386>(MemMgr, Resolver); case Triple::x86_64: - return make_unique<RuntimeDyldMachOX86_64>(MemMgr, Resolver); + return std::make_unique<RuntimeDyldMachOX86_64>(MemMgr, Resolver); } } std::unique_ptr<RuntimeDyld::LoadedObjectInfo> RuntimeDyldMachO::loadObject(const object::ObjectFile &O) { if (auto ObjSectionToIDOrErr = loadObjectImpl(O)) - return llvm::make_unique<LoadedMachOObjectInfo>(*this, + return std::make_unique<LoadedMachOObjectInfo>(*this, *ObjSectionToIDOrErr); else { HasError = true; |