summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2019-02-17 21:25:47 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2019-02-17 21:25:47 +0000
commita82b613c8dee1f2368610e259f30e206e8a99bd2 (patch)
tree43c24becf9e7a2eeefbde5a7fdd1861aa9bf7847 /llvm/lib
parent92b5b195dbaf6570aceac98a1629a3f48042632f (diff)
downloadbcm5719-llvm-a82b613c8dee1f2368610e259f30e206e8a99bd2.tar.gz
bcm5719-llvm-a82b613c8dee1f2368610e259f30e206e8a99bd2.zip
[LLVM-C] Add bindings to create enumerators
Summary: The C API don't have the bindings to create enumerators, needed to create an enumeration. Reviewers: whitequark, CodaFi, harlanhaskins, deadalnix Reviewed By: whitequark, CodaFi, harlanhaskins Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58323 llvm-svn: 354237
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 435685d4261..a9d91214a80 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -899,6 +899,14 @@ LLVMMetadataRef LLVMDILocationGetScope(LLVMMetadataRef Location) {
return wrap(unwrapDI<DILocation>(Location)->getScope());
}
+LLVMMetadataRef LLVMDIBuilderCreateEnumerator(LLVMDIBuilderRef Builder,
+ const char *Name, size_t NameLen,
+ int64_t Value,
+ LLVMBool IsUnsigned) {
+ return wrap(unwrap(Builder)->createEnumerator({Name, NameLen}, Value,
+ IsUnsigned != 0));
+}
+
LLVMMetadataRef LLVMDIBuilderCreateEnumerationType(
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
size_t NameLen, LLVMMetadataRef File, unsigned LineNumber,
OpenPOWER on IntegriCloud