obj2yaml: Use the correct relocation type for different machine types
[oota-llvm.git] / lib / ExecutionEngine / ExecutionEngine.cpp
index 062c13f27896ba28d2946cde6f628ebb8b5c665a..4768e67a1e97f872b29b92c4f7dbd55b3cc598c4 100644 (file)
@@ -97,7 +97,7 @@ public:
     return static_cast<char*>(RawMemory) + sizeof(GVMemoryBlock);
   }
 
-  virtual void deleted() {
+  void deleted() override {
     // We allocated with operator new and with some extra memory hanging off the
     // end, so don't just delete this.  I'm not sure if this is actually
     // required.
@@ -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.
@@ -486,12 +486,12 @@ ExecutionEngine *EngineBuilder::create(TargetMachine *TM) {
     if (UseMCJIT && ExecutionEngine::MCJITCtor) {
       ExecutionEngine *EE =
         ExecutionEngine::MCJITCtor(M, ErrorStr, MCJMM ? MCJMM : JMM,
-                                   AllocateGVsWithCode, TheTM.take());
+                                   AllocateGVsWithCode, TheTM.release());
       if (EE) return EE;
     } else if (ExecutionEngine::JITCtor) {
       ExecutionEngine *EE =
         ExecutionEngine::JITCtor(M, ErrorStr, JMM,
-                                 AllocateGVsWithCode, TheTM.take());
+                                 AllocateGVsWithCode, TheTM.release());
       if (EE) return EE;
     }
   }