//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIB_EXECUTIONENGINE_MCJIT_H
-#define LLVM_LIB_EXECUTIONENGINE_MCJIT_H
+#ifndef LLVM_LIB_EXECUTIONENGINE_MCJIT_MCJIT_H
+#define LLVM_LIB_EXECUTIONENGINE_MCJIT_MCJIT_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
// 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;
OwningModuleContainer OwnedModules;
- SmallVector<object::Archive*, 2> Archives;
+ SmallVector<std::unique_ptr<object::Archive>, 2> Archives;
typedef SmallVector<ObjectImage *, 2> LoadedObjectList;
LoadedObjectList LoadedObjects;
/// @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
static ExecutionEngine *createJIT(Module *M,
std::string *ErrorStr,
RTDyldMemoryManager *MemMgr,
- bool GVsWithCode,
TargetMachine *TM);
// @}