*
* Copyright 2009-2011 Novell Inc (http://www.novell.com)
* Copyright 2011 Xamarin Inc (http://www.xamarin.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include "mini.h"
#define __STDC_CONSTANT_MACROS
#endif
-#include "llvm-c/Core.h"
-#include "llvm-c/ExecutionEngine.h"
#include "llvm-c/BitWriter.h"
#include "llvm-c/Analysis.h"
}
callee = LLVMBuildLoad (builder, tramp_var, "");
#else
+ target =
+ mono_create_jit_trampoline (mono_domain_get (),
+ call->method, &error);
+ if (!mono_error_ok (&error))
+ mono_error_raise_exception (&error); /* FIXME: Don't raise here */
+
callee = LLVMAddFunction (ctx->lmodule, name, llvm_sig);
g_free (name);
LLVMTypeRef icall_sig = LLVMFunctionType (LLVMVoidType (), NULL, 0, FALSE);
callee = emit_jit_callee (ctx, "llvm_resume_unwind_trampoline", icall_sig, target);
#else
- callee = LLVMGetNamedFunction (lmodule, "llvm_resume_unwind_trampoline");
+ callee = LLVMGetNamedFunction (ctx->lmodule, "llvm_resume_unwind_trampoline");
#endif
}
LLVMBuildCall (builder, callee, NULL, 0, "");