LLVM API Documentation
#include "llvm/Support/Casting.h"
Go to the source code of this file.
Defines | |
#define | DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref) |
#define | DEFINE_ISA_CONVERSION_FUNCTIONS(ty, ref) |
#define | DEFINE_STDCXX_CONVERSION_FUNCTIONS(ty, ref) |
#define DEFINE_ISA_CONVERSION_FUNCTIONS | ( | ty, | |
ref | |||
) |
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref) \ \ template<typename T> \ inline T *unwrap(ref P) { \ return cast<T>(unwrap(P)); \ }
Definition at line 28 of file CBindingWrapping.h.
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS | ( | ty, | |
ref | |||
) |
inline ty *unwrap(ref P) { \ return reinterpret_cast<ty*>(P); \ } \ \ inline ref wrap(const ty *P) { \ return reinterpret_cast<ref>(const_cast<ty*>(P)); \ }
Definition at line 19 of file CBindingWrapping.h.
#define DEFINE_STDCXX_CONVERSION_FUNCTIONS | ( | ty, | |
ref | |||
) |
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref) \ \ 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.