assert(0 && "LLVMGenericValueToFloat supports only float and double.");
break;
}
+ return 0; // Not reached
}
void LLVMDisposeGenericValue(LLVMGenericValueRef GenVal) {
char **OutError) {
std::string Error;
if (ExecutionEngine *Interp =
- ExecutionEngine::create(unwrap(MP), false, &Error)) {
+ ExecutionEngine::create(unwrap(MP), true, &Error)) {
*OutInterp = wrap(Interp);
return 0;
}
int LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT,
LLVMModuleProviderRef MP,
+ int Fast,
char **OutError) {
std::string Error;
- if (ExecutionEngine *JIT = ExecutionEngine::createJIT(unwrap(MP), &Error)) {
+ if (ExecutionEngine *JIT = ExecutionEngine::createJIT(unwrap(MP), &Error, 0,
+ Fast != 0)) {
*OutJIT = wrap(JIT);
return 0;
}
}
return 1;
}
+
+LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE) {
+ return wrap(unwrap(EE)->getTargetData());
+}
+
+void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global,
+ void* Addr) {
+ unwrap(EE)->addGlobalMapping(unwrap<GlobalValue>(Global), Addr);
+}
+
+void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global) {
+ return unwrap(EE)->getPointerToGlobal(unwrap<GlobalValue>(Global));
+}