[PATCH] D58323: [LLVM-C] Add bindings to create enumerators

Robert Widmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 17 13:25:22 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL354237: [LLVM-C] Add bindings to create enumerators (authored by CodaFi, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D58323?vs=187139&id=187173#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58323/new/

https://reviews.llvm.org/D58323

Files:
  llvm/trunk/include/llvm-c/DebugInfo.h
  llvm/trunk/lib/IR/DebugInfo.cpp


Index: llvm/trunk/include/llvm-c/DebugInfo.h
===================================================================
--- llvm/trunk/include/llvm-c/DebugInfo.h
+++ llvm/trunk/include/llvm-c/DebugInfo.h
@@ -479,6 +479,19 @@
                                   LLVMDIFlags Flags);
 
 /**
+ * Create debugging information entry for an enumerator.
+ * @param Builder        The DIBuilder.
+ * @param Name           Enumerator name.
+ * @param NameLen        Length of enumerator name.
+ * @param Value          Enumerator value.
+ * @param IsUnsigned     True if the value is unsigned.
+ */
+LLVMMetadataRef LLVMDIBuilderCreateEnumerator(LLVMDIBuilderRef Builder,
+                                              const char *Name, size_t NameLen,
+                                              int64_t Value,
+                                              LLVMBool IsUnsigned);
+
+/**
  * Create debugging information entry for an enumeration.
  * \param Builder        The DIBuilder.
  * \param Scope          Scope in which this enumeration is defined.
Index: llvm/trunk/lib/IR/DebugInfo.cpp
===================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp
+++ llvm/trunk/lib/IR/DebugInfo.cpp
@@ -899,6 +899,14 @@
   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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58323.187173.patch
Type: text/x-patch
Size: 1925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190217/f71b299a/attachment.bin>


More information about the llvm-commits mailing list