Remove dead code.

Every user has been switched to using EngineBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213871 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-07-24 16:02:28 +00:00
parent 3715084d47
commit 6e1b8585bc
3 changed files with 0 additions and 99 deletions

View File

@@ -406,57 +406,6 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
return runFunction(Fn, GVArgs).IntVal.getZExtValue();
}
ExecutionEngine *ExecutionEngine::create(Module *M,
bool ForceInterpreter,
std::string *ErrorStr,
CodeGenOpt::Level OptLevel,
bool GVsWithCode) {
EngineBuilder EB =
EngineBuilder(M)
.setEngineKind(ForceInterpreter ? EngineKind::Interpreter
: EngineKind::Either)
.setErrorStr(ErrorStr)
.setOptLevel(OptLevel)
.setAllocateGVsWithCode(GVsWithCode);
return EB.create();
}
/// createJIT - This is the factory method for creating a JIT for the current
/// machine, it does not fall back to the interpreter. This takes ownership
/// of the module.
ExecutionEngine *ExecutionEngine::createJIT(Module *M,
std::string *ErrorStr,
JITMemoryManager *JMM,
CodeGenOpt::Level OL,
bool GVsWithCode,
Reloc::Model RM,
CodeModel::Model CMM) {
if (!ExecutionEngine::JITCtor) {
if (ErrorStr)
*ErrorStr = "JIT has not been linked in.";
return nullptr;
}
// Use the defaults for extra parameters. Users can use EngineBuilder to
// set them.
EngineBuilder EB(M);
EB.setEngineKind(EngineKind::JIT);
EB.setErrorStr(ErrorStr);
EB.setRelocationModel(RM);
EB.setCodeModel(CMM);
EB.setAllocateGVsWithCode(GVsWithCode);
EB.setOptLevel(OL);
EB.setJITMemoryManager(JMM);
// TODO: permit custom TargetOptions here
TargetMachine *TM = EB.selectTarget();
if (!TM || (ErrorStr && ErrorStr->length() > 0)) return nullptr;
return ExecutionEngine::JITCtor(M, ErrorStr, JMM, GVsWithCode, TM);
}
void EngineBuilder::InitEngine() {
WhichEngine = EngineKind::Either;
ErrorStr = nullptr;