summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Target.h
diff options
context:
space:
mode:
authorAnders Waldenborg <anders@0x63.nu>2013-10-17 18:51:01 +0000
committerAnders Waldenborg <anders@0x63.nu>2013-10-17 18:51:01 +0000
commit959f04077cda4e2b4a4ffdf01351effe983d5e6e (patch)
treee97147f7fc941f6a6086d87c0972e9d21d54a31f /llvm/include/llvm-c/Target.h
parentbef50abea92627bd6941e367fb86347edb72bd8c (diff)
downloadbcm5719-llvm-959f04077cda4e2b4a4ffdf01351effe983d5e6e.tar.gz
bcm5719-llvm-959f04077cda4e2b4a4ffdf01351effe983d5e6e.zip
llvm-c: Add LLVMIntPtrType{,ForAS}InContext
All of the Core API functions have versions which accept explicit context, in addition to ones which work on global context. This commit adds functions which accept explicit context to the Target API for consistency. Patch by Peter Zotov Differential Revision: http://llvm-reviews.chandlerc.com/D1912 llvm-svn: 192913
Diffstat (limited to 'llvm/include/llvm-c/Target.h')
-rw-r--r--llvm/include/llvm-c/Target.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Target.h b/llvm/include/llvm-c/Target.h
index 80fc3e5ad72..27eb14748d4 100644
--- a/llvm/include/llvm-c/Target.h
+++ b/llvm/include/llvm-c/Target.h
@@ -186,6 +186,15 @@ LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef);
See the method llvm::DataLayout::getIntPtrType. */
LLVMTypeRef LLVMIntPtrTypeForAS(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 LLVMIntPtrTypeInContext(LLVMContextRef, 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 LLVMIntPtrTypeForASInContext(LLVMContextRef, 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);
OpenPOWER on IntegriCloud