diff options
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 2 | ||||
-rw-r--r-- | lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp | 3 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 1 | ||||
-rw-r--r-- | lib/ExecutionEngine/MCJIT/MCJIT.cpp | 10 | ||||
-rw-r--r-- | lib/ExecutionEngine/MCJIT/MCJIT.h | 2 | ||||
-rw-r--r-- | lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 2 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 1 | ||||
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 1 |
9 files changed, 11 insertions, 15 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index fee1526780..30185d78cb 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -443,7 +443,7 @@ ExecutionEngine *ExecutionEngine::createJIT(Module *M, } ExecutionEngine *EngineBuilder::create(TargetMachine *TM) { - OwningPtr<TargetMachine> TheTM(TM); // Take ownership. + std::unique_ptr<TargetMachine> TheTM(TM); // Take ownership. // Make sure we can resolve symbols in the program as well. The zero arg // to the function tells DynamicLibrary to load the program, not a library. diff --git a/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp b/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp index 150ef1fff9..2ca4e3e411 100644 --- a/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp +++ b/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp @@ -20,7 +20,6 @@ #include "llvm/IR/Function.h" #include "llvm/IR/Metadata.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/DebugInfo/DIContext.h" #include "llvm/ExecutionEngine/ObjectImage.h" @@ -40,7 +39,7 @@ namespace { class IntelJITEventListener : public JITEventListener { typedef DenseMap<void*, unsigned int> MethodIDMap; - OwningPtr<IntelJITEventsWrapper> Wrapper; + std::unique_ptr<IntelJITEventsWrapper> Wrapper; MethodIDMap MethodIDs; FilenameCache Filenames; diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index 64cee037a0..b0e48cae18 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -15,7 +15,6 @@ #define DEBUG_TYPE "jit" #include "JIT.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp index ce746a546b..aa5f724024 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -146,7 +146,7 @@ ObjectBufferStream* MCJIT::emitObject(Module *M) { PM.add(new DataLayoutPass(M)); // The RuntimeDyld will take ownership of this shortly - OwningPtr<ObjectBufferStream> CompiledObject(new ObjectBufferStream()); + std::unique_ptr<ObjectBufferStream> CompiledObject(new ObjectBufferStream()); // Turn the machine code intermediate representation into bytes in memory // that may be executed. @@ -164,7 +164,7 @@ ObjectBufferStream* MCJIT::emitObject(Module *M) { if (ObjCache) { // MemoryBuffer is a thin wrapper around the actual memory, so it's OK // to create a temporary object here and delete it after the call. - OwningPtr<MemoryBuffer> MB(CompiledObject->getMemBuffer()); + std::unique_ptr<MemoryBuffer> MB(CompiledObject->getMemBuffer()); ObjCache->notifyObjectCompiled(M, MB.get()); } @@ -183,10 +183,10 @@ void MCJIT::generateCodeForModule(Module *M) { if (OwnedModules.hasModuleBeenLoaded(M)) return; - OwningPtr<ObjectBuffer> ObjectToLoad; + std::unique_ptr<ObjectBuffer> ObjectToLoad; // Try to load the pre-compiled object from cache if possible if (0 != ObjCache) { - OwningPtr<MemoryBuffer> PreCompiledObject(ObjCache->getObject(M)); + std::unique_ptr<MemoryBuffer> PreCompiledObject(ObjCache->getObject(M)); if (0 != PreCompiledObject.get()) ObjectToLoad.reset(new ObjectBuffer(PreCompiledObject.release())); } @@ -304,7 +304,7 @@ uint64_t MCJIT::getSymbolAddress(const std::string &Name, // Look for our symbols in each Archive object::Archive::child_iterator ChildIt = A->findSym(Name); if (ChildIt != A->child_end()) { - OwningPtr<object::Binary> ChildBin; + std::unique_ptr<object::Binary> ChildBin; // FIXME: Support nested archives? if (!ChildIt->getAsBinary(ChildBin) && ChildBin->isObject()) { object::ObjectFile *OF = reinterpret_cast<object::ObjectFile *>( diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.h b/lib/ExecutionEngine/MCJIT/MCJIT.h index 09c1bae24e..8fb7474357 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.h +++ b/lib/ExecutionEngine/MCJIT/MCJIT.h @@ -76,7 +76,7 @@ public: private: MCJIT *ParentEngine; - OwningPtr<RTDyldMemoryManager> ClientMM; + std::unique_ptr<RTDyldMemoryManager> ClientMM; }; // About Module states: added->loaded->finalized. diff --git a/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp b/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp index f71b3ea4a4..87cef2e076 100644 --- a/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp +++ b/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp @@ -18,7 +18,6 @@ #define DEBUG_TYPE "oprofile-jit-event-listener" #include "llvm/IR/DebugInfo.h" #include "llvm/IR/Function.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/ExecutionEngine/ObjectImage.h" #include "llvm/ExecutionEngine/OProfileWrapper.h" @@ -229,7 +228,8 @@ void OProfileJITEventListener::NotifyFreeingObject(const ObjectImage &Obj) { namespace llvm { JITEventListener *JITEventListener::createOProfileJITEventListener() { - static OwningPtr<OProfileWrapper> JITProfilingWrapper(new OProfileWrapper); + static std::unique_ptr<OProfileWrapper> JITProfilingWrapper( + new OProfileWrapper); return new OProfileJITEventListener(*JITProfilingWrapper); } diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 6055ffe823..d45b47218a 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -96,7 +96,7 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectBuffer *InputBuffer) { ObjectImage *RuntimeDyldImpl::loadObject(ObjectImage *InputObject) { MutexGuard locked(lock); - OwningPtr<ObjectImage> Obj(InputObject); + std::unique_ptr<ObjectImage> Obj(InputObject); if (!Obj) return NULL; diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index c3736691c2..6ca7fd38d2 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -16,7 +16,6 @@ #include "JITRegistrar.h" #include "ObjectImageCommon.h" #include "llvm/ADT/IntervalMap.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index be80cbcfda..62de7b707c 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -13,7 +13,6 @@ #define DEBUG_TYPE "dyld" #include "RuntimeDyldMachO.h" -#include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" using namespace llvm; |