[PATCH] D49654: Move JIT listener C binding definitions to ExecutionEngineBindings.cpp.
Andres Freund via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 24 12:45:56 PDT 2018
anarazel updated this revision to Diff 157107.
anarazel added a comment.
Previous approach was a brick shy of a load, which I realized after
sleeping on it. We'd just end up with undefined symbol errors for the
listeners that *are* built in (because the part of the class
implementation ptentially is in a different lib). Hence just define
if necessary.
Repository:
rL LLVM
https://reviews.llvm.org/D49654
Files:
include/llvm/ExecutionEngine/JITEventListener.h
lib/ExecutionEngine/ExecutionEngineBindings.cpp
Index: lib/ExecutionEngine/ExecutionEngineBindings.cpp
===================================================================
--- lib/ExecutionEngine/ExecutionEngineBindings.cpp
+++ lib/ExecutionEngine/ExecutionEngineBindings.cpp
@@ -14,6 +14,7 @@
#include "llvm-c/ExecutionEngine.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/GenericValue.h"
+#include "llvm/ExecutionEngine/JITEventListener.h"
#include "llvm/ExecutionEngine/RTDyldMemoryManager.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Module.h"
@@ -411,3 +412,26 @@
delete unwrap(MM);
}
+/*===-- JIT Event Listener functions -------------------------------------===*/
+
+
+#if !LLVM_USE_INTEL_JITEVENTS
+LLVMJITEventListenerRef LLVMCreateIntelJITEventListener(void)
+{
+ return nullptr;
+}
+#endif
+
+#if !LLVM_USE_OPROFILE
+LLVMJITEventListenerRef LLVMCreateOProfileJITEventListener(void)
+{
+ return nullptr;
+}
+#endif
+
+#if !LLVM_USE_PERF
+LLVMJITEventListenerRef LLVMCreatePerfJITEventListener(void)
+{
+ return nullptr;
+}
+#endif
Index: include/llvm/ExecutionEngine/JITEventListener.h
===================================================================
--- include/llvm/ExecutionEngine/JITEventListener.h
+++ include/llvm/ExecutionEngine/JITEventListener.h
@@ -134,16 +134,4 @@
} // end namespace llvm
-#ifndef LLVM_USE_INTEL_JITEVENTS
-LLVMJITEventListenerRef LLVMCreateIntelJITEventListener(void);
-#endif
-
-#ifndef LLVM_USE_OPROFILE
-LLVMJITEventListenerRef LLVMCreateOProfileJITEventListener(void);
-#endif
-
-#ifndef LLVM_USE_PERF
-LLVMJITEventListenerRef LLVMCreatePerfJITEventListener(void);
-#endif
-
#endif // LLVM_EXECUTIONENGINE_JITEVENTLISTENER_H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49654.157107.patch
Type: text/x-patch
Size: 1690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180724/40746c03/attachment-0001.bin>
More information about the llvm-commits
mailing list