summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorAmaury Sechet <deadalnix@gmail.com>2016-02-09 22:50:53 +0000
committerAmaury Sechet <deadalnix@gmail.com>2016-02-09 22:50:53 +0000
commit1dcf577a80258b11c1e87640c8d05526dc5c87fd (patch)
treeb63a673adea295d84b681c94dc1ce90c05c41579 /llvm/lib/IR
parentdf49d1bbb24d9e442c6f7cfeb11085d102412618 (diff)
downloadbcm5719-llvm-1dcf577a80258b11c1e87640c8d05526dc5c87fd.tar.gz
bcm5719-llvm-1dcf577a80258b11c1e87640c8d05526dc5c87fd.zip
Add C binding for AllocaInst::getAllocatedType
Summary: Comes with an awesome test. Depends on D16912 Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16942 llvm-svn: 260313
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/Core.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index 7488abb6a2c..cf23a28ccb6 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -2134,6 +2134,12 @@ LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef Switch) {
return wrap(unwrap<SwitchInst>(Switch)->getDefaultDest());
}
+/*--.. Operations on alloca instructions (only) ............................--*/
+
+LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca) {
+ return wrap(unwrap<AllocaInst>(Alloca)->getAllocatedType());
+}
+
/*--.. Operations on phi nodes .............................................--*/
void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues,
OpenPOWER on IntegriCloud