diff options
author | whitequark <whitequark@whitequark.org> | 2017-06-05 11:49:52 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2017-06-05 11:49:52 +0000 |
commit | f6059fdc547f1f07ef1c22b48da6514a581c3665 (patch) | |
tree | b5754f0c702d23dd67eff0cc4e46695a46dac054 /llvm/include/llvm-c | |
parent | b3398936ab26d7426bd5419da6c57334c3cfc043 (diff) | |
download | bcm5719-llvm-f6059fdc547f1f07ef1c22b48da6514a581c3665.tar.gz bcm5719-llvm-f6059fdc547f1f07ef1c22b48da6514a581c3665.zip |
[LLVM-C] [OCaml] Expose Type::subtypes.
The C functions added are LLVMGetNumContainedTypes and
LLVMGetSubtypes.
The OCaml function added is Llvm.subtypes.
Patch by Ekaterina Vaartis.
Differential Revision: https://reviews.llvm.org/D33677
llvm-svn: 304709
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 0a1d8faf99b..22cef23007c 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -1040,6 +1040,20 @@ LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy); LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty); /** + * Returns type's subtypes + * + * @see llvm::Type::subtypes() + */ +void LLVMGetSubtypes(LLVMTypeRef Tp, LLVMTypeRef *Arr); + +/** + * Return the number of types in the derived type. + * + * @see llvm::Type::getNumContainedTypes() + */ +unsigned LLVMGetNumContainedTypes(LLVMTypeRef Tp); + +/** * Create a fixed size array type that refers to a specific type. * * The created type will exist in the context that its element type |