summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/MCJIT
diff options
context:
space:
mode:
authorAhmed Charles <ahmedcharles@gmail.com>2014-03-05 10:19:29 +0000
committerAhmed Charles <ahmedcharles@gmail.com>2014-03-05 10:19:29 +0000
commit1a6eca243f9274b9b371b7306fa939568ce5c37f (patch)
treee08f8984bc44b63a79a4e1737a47dd66e86c1850 /lib/ExecutionEngine/MCJIT
parent7b62be28cbc6cce31852831570a87d9699fbcecd (diff)
[C++11] Replace OwningPtr::take() with OwningPtr::release().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/MCJIT')
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index a0dfbef51f3..ce746a546bf 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -168,7 +168,7 @@ ObjectBufferStream* MCJIT::emitObject(Module *M) {
ObjCache->notifyObjectCompiled(M, MB.get());
}
- return CompiledObject.take();
+ return CompiledObject.release();
}
void MCJIT::generateCodeForModule(Module *M) {
@@ -188,7 +188,7 @@ void MCJIT::generateCodeForModule(Module *M) {
if (0 != ObjCache) {
OwningPtr<MemoryBuffer> PreCompiledObject(ObjCache->getObject(M));
if (0 != PreCompiledObject.get())
- ObjectToLoad.reset(new ObjectBuffer(PreCompiledObject.take()));
+ ObjectToLoad.reset(new ObjectBuffer(PreCompiledObject.release()));
}
// If the cache did not contain a suitable object, compile the object
@@ -199,7 +199,7 @@ void MCJIT::generateCodeForModule(Module *M) {
// Load the object into the dynamic linker.
// MCJIT now owns the ObjectImage pointer (via its LoadedObjects list).
- ObjectImage *LoadedObject = Dyld.loadObject(ObjectToLoad.take());
+ ObjectImage *LoadedObject = Dyld.loadObject(ObjectToLoad.release());
LoadedObjects.push_back(LoadedObject);
if (!LoadedObject)
report_fatal_error(Dyld.getErrorString());
@@ -308,7 +308,7 @@ uint64_t MCJIT::getSymbolAddress(const std::string &Name,
// FIXME: Support nested archives?
if (!ChildIt->getAsBinary(ChildBin) && ChildBin->isObject()) {
object::ObjectFile *OF = reinterpret_cast<object::ObjectFile *>(
- ChildBin.take());
+ ChildBin.release());
// This causes the object file to be loaded.
addObjectFile(OF);
// The address should be here now.