diff options
Diffstat (limited to 'contrib/llvm/include/llvm-c/TargetMachine.h')
-rw-r--r-- | contrib/llvm/include/llvm-c/TargetMachine.h | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/contrib/llvm/include/llvm-c/TargetMachine.h b/contrib/llvm/include/llvm-c/TargetMachine.h index 691abdf..5e35595 100644 --- a/contrib/llvm/include/llvm-c/TargetMachine.h +++ b/contrib/llvm/include/llvm-c/TargetMachine.h @@ -25,7 +25,7 @@ #ifdef __cplusplus extern "C" { #endif -typedef struct LLVMTargetMachine *LLVMTargetMachineRef; +typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef; typedef struct LLVMTarget *LLVMTargetRef; typedef enum { @@ -114,30 +114,11 @@ LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T); LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M, char *Filename, LLVMCodeGenFileType codegen, char **ErrorMessage); - - - +/** Compile the LLVM IR stored in \p M and store the result in \p OutMemBuf. */ +LLVMBool LLVMTargetMachineEmitToMemoryBuffer(LLVMTargetMachineRef T, LLVMModuleRef M, + LLVMCodeGenFileType codegen, char** ErrorMessage, LLVMMemoryBufferRef *OutMemBuf); #ifdef __cplusplus } - -namespace llvm { - class TargetMachine; - class Target; - - inline TargetMachine *unwrap(LLVMTargetMachineRef P) { - return reinterpret_cast<TargetMachine*>(P); - } - inline Target *unwrap(LLVMTargetRef P) { - return reinterpret_cast<Target*>(P); - } - inline LLVMTargetMachineRef wrap(const TargetMachine *P) { - return reinterpret_cast<LLVMTargetMachineRef>( - const_cast<TargetMachine*>(P)); - } - inline LLVMTargetRef wrap(const Target * P) { - return reinterpret_cast<LLVMTargetRef>(const_cast<Target*>(P)); - } -} #endif #endif |