LLVM  14.0.0git
Macros
CBindingWrapping.h File Reference
#include "llvm-c/Types.h"
#include "llvm/Support/Casting.h"
Include dependency graph for CBindingWrapping.h:
This graph shows which files directly or indirectly include this file:

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)); \
}

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)); \
}

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.

P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
T
#define T
Definition: Mips16ISelLowering.cpp:341
DEFINE_SIMPLE_CONVERSION_FUNCTIONS
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
Definition: CBindingWrapping.h:19
llvm::unwrap
Attribute unwrap(LLVMAttributeRef Attr)
Definition: Attributes.h:256
llvm::wrap
LLVMAttributeRef wrap(Attribute Attr)
Definition: Attributes.h:251