# Check which functionality is present
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
- AC_CHECK_DECLS([LLVMOrcGetSymbolAddressIn, LLVMOrcRegisterGDB, LLVMOrcRegisterPerf], [], [], [[#include <llvm-c/OrcBindings.h>]])
+ AC_CHECK_DECLS([LLVMOrcGetSymbolAddressIn], [], [], [[#include <llvm-c/OrcBindings.h>]])
AC_CHECK_DECLS([LLVMGetHostCPUName], [], [], [[#include <llvm-c/TargetMachine.h>]])
+ AC_CHECK_DECLS([LLVMCreateGDBRegistrationListener, LLVMCreatePerfJITEventListener], [], [], [[#include <llvm-c/ExecutionEngine.h>]])
CPPFLAGS="$SAVE_CPPFLAGS"
# LLVM_CONFIG, CLANG are already output via AC_ARG_VAR
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
_ACEOF
-ac_fn_c_check_decl "$LINENO" "LLVMOrcRegisterGDB" "ac_cv_have_decl_LLVMOrcRegisterGDB" "#include <llvm-c/OrcBindings.h>
+
+ ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
"
-if test "x$ac_cv_have_decl_LLVMOrcRegisterGDB" = xyes; then :
+if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LLVMORCREGISTERGDB $ac_have_decl
+#define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
_ACEOF
-ac_fn_c_check_decl "$LINENO" "LLVMOrcRegisterPerf" "ac_cv_have_decl_LLVMOrcRegisterPerf" "#include <llvm-c/OrcBindings.h>
+
+ ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
"
-if test "x$ac_cv_have_decl_LLVMOrcRegisterPerf" = xyes; then :
+if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LLVMORCREGISTERPERF $ac_have_decl
+#define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
_ACEOF
-
- ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
+ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
"
-if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
+if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
+#define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
_ACEOF
CPPFLAGS="$SAVE_CPPFLAGS"
#include <llvm-c/BitReader.h>
#include <llvm-c/BitWriter.h>
#include <llvm-c/Core.h>
+#include <llvm-c/ExecutionEngine.h>
#include <llvm-c/OrcBindings.h>
#include <llvm-c/Support.h>
#include <llvm-c/Target.h>
llvm_opt0_orc = LLVMOrcCreateInstance(llvm_opt0_targetmachine);
llvm_opt3_orc = LLVMOrcCreateInstance(llvm_opt3_targetmachine);
-#if defined(HAVE_DECL_LLVMORCREGISTERGDB) && HAVE_DECL_LLVMORCREGISTERGDB
+#if defined(HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER) && HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
if (jit_debugging_support)
{
- LLVMOrcRegisterGDB(llvm_opt0_orc);
- LLVMOrcRegisterGDB(llvm_opt3_orc);
+ LLVMJITEventListenerRef l = LLVMCreateGDBRegistrationListener();
+
+ LLVMOrcRegisterJITEventListener(llvm_opt0_orc, l);
+ LLVMOrcRegisterJITEventListener(llvm_opt3_orc, l);
}
#endif
-#if defined(HAVE_DECL_LLVMORCREGISTERPERF) && HAVE_DECL_LLVMORCREGISTERPERF
+#if defined(HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER) && HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
if (jit_profiling_support)
{
- LLVMOrcRegisterPerf(llvm_opt0_orc);
- LLVMOrcRegisterPerf(llvm_opt3_orc);
+ LLVMJITEventListenerRef l = LLVMCreatePerfJITEventListener();
+
+ LLVMOrcRegisterJITEventListener(llvm_opt0_orc, l);
+ LLVMOrcRegisterJITEventListener(llvm_opt3_orc, l);
}
#endif
don't. */
#undef HAVE_DECL_F_FULLFSYNC
+/* Define to 1 if you have the declaration of
+ `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
+
+/* Define to 1 if you have the declaration of
+ `LLVMCreatePerfJITEventListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
+
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
if you don't. */
#undef HAVE_DECL_LLVMGETHOSTCPUNAME
to 0 if you don't. */
#undef HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterGDB', and to 0
- if you don't. */
-#undef HAVE_DECL_LLVMORCREGISTERGDB
-
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterPerf', and to 0
- if you don't. */
-#undef HAVE_DECL_LLVMORCREGISTERPERF
-
/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
don't. */
#undef HAVE_DECL_POSIX_FADVISE
don't. */
#define HAVE_DECL_F_FULLFSYNC 0
+/* Define to 1 if you have the declaration of
+ `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER
+
+/* Define to 1 if you have the declaration of
+ `LLVMCreatePerfJITEventListener', and to 0 if you don't. */
+#undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER
+
/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
if you don't. */
#define HAVE_DECL_LLVMGETHOSTCPUNAME 0
to 0 if you don't. */
#define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN 0
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterGDB', and to 0
- if you don't. */
-#define HAVE_DECL_LLVMORCREGISTERGDB 0
-
-/* Define to 1 if you have the declaration of `LLVMOrcRegisterPerf', and to 0
- if you don't. */
-#define HAVE_DECL_LLVMORCREGISTERPERF 0
-
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#define HAVE_DECL_SNPRINTF 1