diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-27 20:13:47 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-27 20:13:47 +0000 |
commit | a353ffa7e556bfd2864474911174da691117f691 (patch) | |
tree | 054cd740a91cb46aa8c2a2a06a55510aff2864ce /lib/VMCore/Core.cpp | |
parent | 1d2e49cd84290e19ffcf1011a650cf04dac6a1cd (diff) | |
download | external_llvm-a353ffa7e556bfd2864474911174da691117f691.zip external_llvm-a353ffa7e556bfd2864474911174da691117f691.tar.gz external_llvm-a353ffa7e556bfd2864474911174da691117f691.tar.bz2 |
Adding bindings for target triple and data layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 6c57d74..701829b 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -43,6 +43,25 @@ void LLVMDisposeModule(LLVMModuleRef M) { delete unwrap(M); } +/*--.. Data layout .........................................................--*/ +const char * LLVMGetDataLayout(LLVMModuleRef M) { + return unwrap(M)->getDataLayout().c_str(); +} + +void LLVMSetDataLayout(LLVMModuleRef M, const char *Triple) { + unwrap(M)->setDataLayout(Triple); +} + +/*--.. Target triple .......................................................--*/ +const char * LLVMGetTarget(LLVMModuleRef M) { + return unwrap(M)->getTargetTriple().c_str(); +} + +void LLVMSetTarget(LLVMModuleRef M, const char *Triple) { + unwrap(M)->setTargetTriple(Triple); +} + +/*--.. Type names ..........................................................--*/ int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty) { return unwrap(M)->addTypeName(Name, unwrap(Ty)); } |