llvm.org GIT mirror llvm / 2373d70
[ORC][C-API] Expose LLVMOrc{Unr,R}egisterJITEventListener(). Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D44890 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333229 91177308-0d34-0410-b5e6-96231b3b80d8 Andres Freund 1 year, 3 months ago
4 changed file(s) with 34 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1414 #ifndef LLVM_EXECUTIONENGINE_JITEVENTLISTENER_H
1515 #define LLVM_EXECUTIONENGINE_JITEVENTLISTENER_H
1616
17 #include "llvm-c/ExecutionEngine.h"
1718 #include "llvm/Config/llvm-config.h"
1819 #include "llvm/ExecutionEngine/RuntimeDyld.h"
1920 #include "llvm/IR/DebugLoc.h"
21 #include "llvm/Support/CBindingWrapping.h"
2022 #include
2123 #include
2224
118120 virtual void anchor();
119121 };
120122
123 DEFINE_SIMPLE_CONVERSION_FUNCTIONS(JITEventListener, LLVMJITEventListenerRef)
124
121125 } // end namespace llvm
122126
123127 #endif // LLVM_EXECUTIONENGINE_JITEVENTLISTENER_H
153153 */
154154 LLVMOrcErrorCode LLVMOrcDisposeInstance(LLVMOrcJITStackRef JITStack);
155155
156 /**
157 * Register a JIT Event Listener.
158 *
159 * A NULL listener is ignored.
160 */
161 void LLVMOrcRegisterJITEventListener(LLVMOrcJITStackRef JITStack, LLVMJITEventListenerRef L);
162
163 /**
164 * Unegister a JIT Event Listener.
165 *
166 * A NULL listener is ignored.
167 */
168 void LLVMOrcUnregisterJITEventListener(LLVMOrcJITStackRef JITStack, LLVMJITEventListenerRef L);
169
156170 #ifdef __cplusplus
157171 }
158172 #endif /* extern "C" */
144144 typedef struct LLVMOpaqueModuleFlagEntry LLVMModuleFlagEntry;
145145
146146 /**
147 * @see llvm::JITEventListener
148 */
149 typedef struct LLVMOpaqueJITEventListener *LLVMJITEventListenerRef;
150
151 /**
147152 * @}
148153 */
149154
88
99 #include "OrcCBindingsStack.h"
1010 #include "llvm-c/OrcBindings.h"
11 #include "llvm/ExecutionEngine/JITEventListener.h"
1112
1213 using namespace llvm;
1314
125126 delete J;
126127 return Err;
127128 }
129
130 void LLVMOrcRegisterJITEventListener(LLVMOrcJITStackRef JITStack, LLVMJITEventListenerRef L)
131 {
132 unwrap(JITStack)->RegisterJITEventListener(unwrap(L));
133 }
134
135 void LLVMOrcUnregisterJITEventListener(LLVMOrcJITStackRef JITStack, LLVMJITEventListenerRef L)
136 {
137 unwrap(JITStack)->UnregisterJITEventListener(unwrap(L));
138 }