diff options
author | whitequark <whitequark@whitequark.org> | 2018-09-18 01:47:37 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2018-09-18 01:47:37 +0000 |
commit | b486107c208e08e67d6703c8180e66d648c767aa (patch) | |
tree | bbb64e2a8cd9bb6c8cdecd5b6b7dc7fd3f3c7660 /llvm/lib/IR | |
parent | 6c1f7a51b9e12e143bc2660c22293172f86ea014 (diff) | |
download | bcm5719-llvm-b486107c208e08e67d6703c8180e66d648c767aa.tar.gz bcm5719-llvm-b486107c208e08e67d6703c8180e66d648c767aa.zip |
[LLVM-C][OCaml] Add C and OCaml APIs for llvm::StructType::isLiteral
Summary:
This patch adds LLVMIsLiteralStruct to the C API to expose
StructType::isLiteral. This is then used to implement the analogous
addition to the OCaml API.
Reviewers: whitequark, deadalnix
Reviewed By: whitequark
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D52209
llvm-svn: 342435
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Core.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 3a6f56625b6..7e8c656a6f6 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -706,6 +706,10 @@ LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy) { return unwrap<StructType>(StructTy)->isOpaque(); } +LLVMBool LLVMIsLiteralStruct(LLVMTypeRef StructTy) { + return unwrap<StructType>(StructTy)->isLiteral(); +} + LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name) { return wrap(unwrap(M)->getTypeByName(Name)); } |