X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FExecutionEngine%2FMCJIT%2FMCJIT.cpp;h=ce746a546bf65991ad702dc7a4d0f680c2d653cf;hp=a0dfbef51f3302aa8c8a6958d22d12392eba6843;hb=1a6eca243f9274b9b371b7306fa939568ce5c37f;hpb=7b62be28cbc6cce31852831570a87d9699fbcecd 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 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( - ChildBin.take()); + ChildBin.release()); // This causes the object file to be loaded. addObjectFile(OF); // The address should be here now.