summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2015-06-04 09:09:53 +0000
committerPeter Zotov <whitequark@whitequark.org>2015-06-04 09:09:53 +0000
commitc164a3f4e6e198fdccce38b794886f1829933833 (patch)
treefb4f2c512865ebfb8e156a8b5f5a046adc9a4ab0 /llvm/lib
parentb58159ab1fbaec7b525c5c9267c73d5117fed1a7 (diff)
downloadbcm5719-llvm-c164a3f4e6e198fdccce38b794886f1829933833.tar.gz
bcm5719-llvm-c164a3f4e6e198fdccce38b794886f1829933833.zip
[C API] Add LLVMStructGetTypeAtIndex.
Patch by deadalnix (Amaury SECHET). llvm-svn: 239029
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Core.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index 9557cda5a9c..d476434542e 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -461,6 +461,11 @@ void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest) {
*Dest++ = wrap(*I);
}
+LLVMTypeRef LLVMStructGetTypeAtIndex(LLVMTypeRef StructTy, unsigned i) {
+ StructType *Ty = unwrap<StructType>(StructTy);
+ return wrap(Ty->getTypeAtIndex(i));
+}
+
LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy) {
return unwrap<StructType>(StructTy)->isPacked();
}
OpenPOWER on IntegriCloud