Fix a ValueTracking rule: RHS means operand 1, not 0. Add a simple
[oota-llvm.git] / lib / ExecutionEngine / ExecutionEngineBindings.cpp
index 5ceeb9097d002086c97a4d9ed04ff3119a8f12c6..39bf60121e08bbbb6a83a804e1bd3d20d394e80c 100644 (file)
@@ -114,11 +114,11 @@ int LLVMCreateInterpreter(LLVMExecutionEngineRef *OutInterp,
 
 int LLVMCreateJITCompiler(LLVMExecutionEngineRef *OutJIT,
                           LLVMModuleProviderRef MP,
-                          char **OutError,
-                          bool Fast = false) {
+                          int Fast,
+                          char **OutError) {
   std::string Error;
   if (ExecutionEngine *JIT = ExecutionEngine::createJIT(unwrap(MP), &Error, 0,
-                                                        Fast)) {
+                                                        Fast != 0)) {
     *OutJIT = wrap(JIT);
     return 0;
   }
@@ -199,3 +199,7 @@ 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));
+}