summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Target.cpp
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-15 16:24:29 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-15 16:24:29 +0000
commit4bb926d91dbd9842c20dbeb0d6abea7dee36e1fa (patch)
tree882e998a0f6267013cf4b5a4e827cc007d11084b /llvm/lib/Target/Target.cpp
parentef206f19a4be428092b173339df138a3c17e1687 (diff)
downloadbcm5719-llvm-4bb926d91dbd9842c20dbeb0d6abea7dee36e1fa.tar.gz
bcm5719-llvm-4bb926d91dbd9842c20dbeb0d6abea7dee36e1fa.zip
Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis.
llvm-svn: 165941
Diffstat (limited to 'llvm/lib/Target/Target.cpp')
-rw-r--r--llvm/lib/Target/Target.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/Target/Target.cpp b/llvm/lib/Target/Target.cpp
index 219cbf1afc9..393178a4692 100644
--- a/llvm/lib/Target/Target.cpp
+++ b/llvm/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));
}
OpenPOWER on IntegriCloud