/**************************************************************************
*
- * Copyright 2009 VMware, Inc.
+ * Copyright 2012 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
#define LP_BLD_MISC_H
-#include "llvm/Config/config.h"
+#include "lp_bld.h"
+#include <llvm-c/ExecutionEngine.h>
+
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef LLVM_NATIVE_ARCH
+struct lp_generated_code;
+
+extern void
+gallivm_init_llvm_targets(void);
+
+extern void
+lp_set_target_options(void);
+
+
+extern LLVMValueRef
+lp_build_load_volatile(LLVMBuilderRef B, LLVMValueRef PointerVal,
+ const char *Name);
-void
-LLVMLinkInJIT(void);
+extern int
+lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
+ struct lp_generated_code **OutCode,
+ LLVMModuleRef M,
+ LLVMMCJITMemoryManagerRef MM,
+ unsigned OptLevel,
+ int useMCJIT,
+ char **OutError);
-int
-LLVMInitializeNativeTarget(void);
+extern void
+lp_free_generated_code(struct lp_generated_code *code);
-#endif /* !LLVM_NATIVE_ARCH */
+extern LLVMMCJITMemoryManagerRef
+lp_get_default_memory_manager();
+extern void
+lp_free_memory_manager(LLVMMCJITMemoryManagerRef memorymgr);
#ifdef __cplusplus
}