#endif
#include "jit-icalls.h"
-#include "mini-llvm-cpp.h"
#include <mono/utils/mono-error-internals.h>
+#ifdef ENABLE_LLVM
+#include "mini-llvm-cpp.h"
+#endif
+
void*
mono_ldftn (MonoMethod *method)
{
}
}
+#ifdef ENABLE_LLVM
cfg->cbb->try_end = (intptr_t)(ip - header->code);
+#endif
if ((handlers = mono_find_final_block (cfg, ip, target, MONO_EXCEPTION_CLAUSE_FINALLY))) {
GList *tmp;
#include "trace.h"
#include "debugger-agent.h"
#include "seq-points.h"
+
+#ifdef ENABLE_LLVM
#include "mini-llvm-cpp.h"
+#endif
#ifdef ENABLE_EXTENSION_MODULE
#include "../../../mono-extensions/mono/mini/mini-exceptions.c"
#endif
cbs.mono_walk_stack_with_ctx = mono_runtime_walk_stack_with_ctx;
cbs.mono_walk_stack_with_state = mono_walk_stack_with_state;
+
+#ifdef ENABLE_LLVM
if (mono_llvm_only)
cbs.mono_raise_exception = mono_llvm_raise_exception;
else
+#endif
cbs.mono_raise_exception = mono_get_throw_exception ();
cbs.mono_raise_exception_with_ctx = mono_raise_exception_with_ctx;
cbs.mono_exception_walk_trace = mono_exception_walk_trace;
#include <stdint.h>
-#include <llvm/Support/raw_ostream.h>
+#include <llvm/Support /raw_ostream.h>
#include <llvm/Support/Host.h>
#include <llvm/PassManager.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include "debugger-agent.h"
#ifdef MONO_ARCH_LLVM_SUPPORTED
- #include "mini-llvm-cpp.h"
+#ifdef ENABLE_LLVM
+#include "mini-llvm-cpp.h"
+#endif
#endif
static guint32 default_opt = 0;
register_icall (mono_domain_get, "mono_domain_get", "ptr", TRUE);
#ifdef MONO_ARCH_LLVM_SUPPORTED
+#ifdef ENABLE_LLVM
register_icall (mono_llvm_throw_exception, "mono_llvm_throw_exception", "void object", TRUE);
register_icall (mono_llvm_rethrow_exception, "mono_llvm_rethrow_exception", "void object", TRUE);
register_icall (mono_llvm_resume_exception, "mono_llvm_resume_exception", "void", TRUE);
// FIXME: This is broken
register_icall (mono_debug_personality, "mono_debug_personality", "int int int ptr ptr ptr", TRUE);
+#endif
#endif
register_dyn_icall (mono_get_throw_exception (), "mono_arch_throw_exception", "void object", TRUE);