summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2018-09-18 01:47:37 +0000
committerwhitequark <whitequark@whitequark.org>2018-09-18 01:47:37 +0000
commitb486107c208e08e67d6703c8180e66d648c767aa (patch)
treebbb64e2a8cd9bb6c8cdecd5b6b7dc7fd3f3c7660 /llvm/lib/IR
parent6c1f7a51b9e12e143bc2660c22293172f86ea014 (diff)
downloadbcm5719-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.cpp4
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));
}
OpenPOWER on IntegriCloud