LLVM 19.0.0git
Macros
CBindingWrapping.h File Reference
#include "llvm-c/Types.h"
#include "llvm/Support/Casting.h"

Go to the source code of this file.

Macros

#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
 
#define DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref)
 
#define DEFINE_STDCXX_CONVERSION_FUNCTIONS(ty, ref)
 

Macro Definition Documentation

◆ DEFINE_ISA_CONVERSION_FUNCTIONS

#define DEFINE_ISA_CONVERSION_FUNCTIONS (   ty,
  ref 
)
Value:
\
template<typename T> \
inline T *unwrap(ref P) { \
return cast<T>(unwrap(P)); \
}
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
#define P(N)
SymbolStringPoolEntryUnsafe unwrap(LLVMOrcSymbolStringPoolEntryRef E)

Definition at line 28 of file CBindingWrapping.h.

◆ DEFINE_SIMPLE_CONVERSION_FUNCTIONS

#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS (   ty,
  ref 
)
Value:
inline ty *unwrap(ref P) { \
return reinterpret_cast<ty*>(P); \
} \
\
inline ref wrap(const ty *P) { \
return reinterpret_cast<ref>(const_cast<ty*>(P)); \
}
static LLVMTargetMachineRef wrap(const TargetMachine *P)

Definition at line 19 of file CBindingWrapping.h.

◆ DEFINE_STDCXX_CONVERSION_FUNCTIONS

#define DEFINE_STDCXX_CONVERSION_FUNCTIONS (   ty,
  ref 
)
Value:
\
template<typename T> \
inline T *unwrap(ref P) { \
T *Q = (T*)unwrap(P); \
assert(Q && "Invalid cast!"); \
return Q; \
}

Definition at line 36 of file CBindingWrapping.h.