Add optional TargetMachine param to EngineBuilder.create.
This commit is contained in:
parent
a6ed8d55f8
commit
e8c7fcfd32
5 changed files with 83 additions and 8 deletions
|
|
@ -723,6 +723,22 @@ LLVMExecutionEngineRef LLVMEngineBuilderCreate(LLVMEngineBuilderRef eb, std::str
|
|||
}
|
||||
}
|
||||
|
||||
LLVMExecutionEngineRef LLVMEngineBuilderCreateTM(LLVMEngineBuilderRef eb,
|
||||
LLVMTargetMachineRef tm,
|
||||
std::string & error)
|
||||
{
|
||||
using namespace llvm;
|
||||
LLVMExecutionEngineRef ret;
|
||||
|
||||
ret = wrap(unwrap(eb)->setErrorStr(&error).create(unwrap(tm)));
|
||||
|
||||
if ( !error.empty() ) { // error string is set
|
||||
return NULL;
|
||||
} else {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
int LLVMPassManagerBuilderGetOptLevel(LLVMPassManagerBuilderRef pmb)
|
||||
{
|
||||
return llvm::unwrap(pmb)->OptLevel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue