Replace comment about ownership with std::unique_ptr.
[oota-llvm.git] / lib / ExecutionEngine / MCJIT / MCJIT.h
index da1e975d4cd9dbc110d88396bb8310049424c343..83e3321db92499961c291da610d015a2adb835c5 100644 (file)
@@ -101,8 +101,7 @@ private:
 // called.
 
 class MCJIT : public ExecutionEngine {
-  MCJIT(Module *M, TargetMachine *tm, RTDyldMemoryManager *MemMgr,
-        bool AllocateGVsWithCode);
+  MCJIT(Module *M, TargetMachine *tm, RTDyldMemoryManager *MemMgr);
 
   typedef llvm::SmallPtrSet<Module *, 4> ModulePtrSet;
 
@@ -216,7 +215,7 @@ class MCJIT : public ExecutionEngine {
 
   OwningModuleContainer OwnedModules;
 
-  SmallVector<object::Archive*, 2> Archives;
+  SmallVector<std::unique_ptr<object::Archive>, 2> Archives;
 
   typedef SmallVector<ObjectImage *, 2> LoadedObjectList;
   LoadedObjectList  LoadedObjects;
@@ -239,8 +238,8 @@ public:
   /// @name ExecutionEngine interface implementation
   /// @{
   void addModule(Module *M) override;
-  void addObjectFile(object::ObjectFile *O) override;
-  void addArchive(object::Archive *O) override;
+  void addObjectFile(std::unique_ptr<object::ObjectFile> O) override;
+  void addArchive(std::unique_ptr<object::Archive> O) override;
   bool removeModule(Module *M) override;
 
   /// FindFunctionNamed - Search all of the active modules to find the one that
@@ -328,7 +327,6 @@ public:
   static ExecutionEngine *createJIT(Module *M,
                                     std::string *ErrorStr,
                                     RTDyldMemoryManager *MemMgr,
-                                    bool GVsWithCode,
                                     TargetMachine *TM);
 
   // @}