diff options
author | Peter Zotov <whitequark@whitequark.org> | 2015-06-04 09:09:53 +0000 |
---|---|---|
committer | Peter Zotov <whitequark@whitequark.org> | 2015-06-04 09:09:53 +0000 |
commit | d34142ebf7bb4b9ced2ad950662d5b90678f1d0d (patch) | |
tree | 9eff04f6dc8451d4b10106a8137f9d6a4c3a9b39 /lib/IR/Core.cpp | |
parent | 0880fe599726621c3368278208ef6ec7555cacd8 (diff) |
[C API] Add LLVMStructGetTypeAtIndex.
Patch by deadalnix (Amaury SECHET).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Core.cpp')
-rw-r--r-- | lib/IR/Core.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index 9557cda5a9c..d476434542e 100644 --- a/lib/IR/Core.cpp +++ b/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(); } |