summaryrefslogtreecommitdiff
path: root/include/llvm-c/Target.h
diff options
context:
space:
mode:
authorMicah Villmow <villmow@gmail.com>2012-10-11 17:21:41 +0000
committerMicah Villmow <villmow@gmail.com>2012-10-11 17:21:41 +0000
commitf3840d2c16a4ec4c879a8ded402835746de380f8 (patch)
tree705fb3f3aea368f4880d2d672312e6b783528718 /include/llvm-c/Target.h
parentebba49395c189364c9ef77fb4c432856330ceca1 (diff)
downloadllvm-f3840d2c16a4ec4c879a8ded402835746de380f8.tar.gz
llvm-f3840d2c16a4ec4c879a8ded402835746de380f8.tar.bz2
llvm-f3840d2c16a4ec4c879a8ded402835746de380f8.tar.xz
Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c/Target.h')
-rw-r--r--include/llvm-c/Target.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm-c/Target.h b/include/llvm-c/Target.h
index 92228701e3..57abfa0207 100644
--- a/include/llvm-c/Target.h
+++ b/include/llvm-c/Target.h
@@ -172,10 +172,20 @@ enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef);
See the method llvm::DataLayout::getPointerSize. */
unsigned LLVMPointerSize(LLVMTargetDataRef);
+/** Returns the pointer size in bytes for a target for a specified
+ address space.
+ See the method llvm::DataLayout::getPointerSize. */
+unsigned LLVMPointerSizeForAS(LLVMTargetDataRef, unsigned AS);
+
/** Returns the integer type that is the same size as a pointer on a target.
See the method llvm::DataLayout::getIntPtrType. */
LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef);
+/** Returns the integer type that is the same size as a pointer on a target.
+ This version allows the address space to be specified.
+ See the method llvm::DataLayout::getIntPtrType. */
+LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef, unsigned AS);
+
/** Computes the size of a type in bytes for a target.
See the method llvm::DataLayout::getTypeSizeInBits. */
unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef, LLVMTypeRef);