diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-15 16:24:29 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-15 16:24:29 +0000 |
commit | 2c39b15073db81d93bb629303915b7d7e5d088dc (patch) | |
tree | 966e03c76191ad625cf466ea6ccf1238ddc23ed7 /lib/Target/Target.cpp | |
parent | f35c62bf025411393c7df0803851010cc0e597ba (diff) |
Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Target.cpp')
-rw-r--r-- | lib/Target/Target.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/Target.cpp b/lib/Target/Target.cpp index 219cbf1afc..393178a469 100644 --- a/lib/Target/Target.cpp +++ b/lib/Target/Target.cpp @@ -56,13 +56,21 @@ LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD) { } unsigned LLVMPointerSize(LLVMTargetDataRef TD) { - return unwrap(TD)->getPointerSize(); + return unwrap(TD)->getPointerSize(0); +} + +unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS) { + return unwrap(TD)->getPointerSize(AS); } LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD) { return wrap(unwrap(TD)->getIntPtrType(getGlobalContext())); } +LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS) { + return wrap(unwrap(TD)->getIntPtrType(getGlobalContext(), AS)); +} + unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty) { return unwrap(TD)->getTypeSizeInBits(unwrap(Ty)); } |