#include "compiler.h"
#include <type_traits>
+/// This macro should be used to define tags that will be associated with
+/// handlers in the JIT process, and call can be used to define tags f
+#define ORC_RT_JIT_DISPATCH_TAG(X) \
+extern "C" char X; \
+char X = 0;
+
/// Opaque struct for external symbols.
struct __orc_rt_Opaque {};
using namespace __orc_rt::macho;
// Declare function tags for functions in the JIT process.
-extern "C" char __orc_rt_macho_get_initializers_tag;
-char __orc_rt_macho_get_initializers_tag = 0;
-
-extern "C" char __orc_rt_macho_get_deinitializers_tag;
-char __orc_rt_macho_get_deinitializers_tag = 0;
-
-extern "C" char __orc_rt_macho_symbol_lookup_tag;
-char __orc_rt_macho_symbol_lookup_tag = 0;
+ORC_RT_JIT_DISPATCH_TAG(__orc_rt_macho_get_initializers_tag)
+ORC_RT_JIT_DISPATCH_TAG(__orc_rt_macho_get_deinitializers_tag)
+ORC_RT_JIT_DISPATCH_TAG(__orc_rt_macho_symbol_lookup_tag)
// eh-frame registration functions.
// We expect these to be available for all processes.