#include "llvm-c/Target.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Value.h"
#include "llvm/InitializePasses.h"
#include <cstring>
usingnamespacellvm;
extern "C" LLVMContextRef LLVMGetGlobalContext(void);
inline TargetLibraryInfoImpl *unwrap(LLVMTargetLibraryInfoRef P) { … }
inline LLVMTargetLibraryInfoRef wrap(const TargetLibraryInfoImpl *P) { … }
void llvm::initializeTarget(PassRegistry &Registry) { … }
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M) { … }
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL) { … }
LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep) { … }
void LLVMDisposeTargetData(LLVMTargetDataRef TD) { … }
void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI,
LLVMPassManagerRef PM) { … }
char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD) { … }
LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD) { … }
unsigned LLVMPointerSize(LLVMTargetDataRef TD) { … }
unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS) { … }
LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD) { … }
LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS) { … }
LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD) { … }
LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS) { … }
unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty) { … }
unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) { … }
unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) { … }
unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) { … }
unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) { … }
unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty) { … }
unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD,
LLVMValueRef GlobalVar) { … }
unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy,
unsigned long long Offset) { … }
unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, LLVMTypeRef StructTy,
unsigned Element) { … }