[llvm] [OCaml] Make OCaml MetadataKind type consistent with C API (PR #134507)

via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 5 13:47:34 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: Alan (alan-j-hu)

<details>
<summary>Changes</summary>

Fixes breakage of OCaml API introduced by commit 6894734.

---
Full diff: https://github.com/llvm/llvm-project/pull/134507.diff


4 Files Affected:

- (modified) llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml (+1) 
- (modified) llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli (+1) 
- (modified) llvm/include/llvm-c/DebugInfo.h (+1-1) 
- (modified) llvm/test/CMakeLists.txt (+1) 


``````````diff
diff --git a/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml b/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
index b5c8128c4c090..3e9a82962d99a 100644
--- a/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
+++ b/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
@@ -144,6 +144,7 @@ module MetadataKind = struct
     | DIArgListMetadataKind
     | DIAssignIDMetadataKind
     | DISubrangeTypeMetadataKind
+    | DIFixedPointTypeMetadataKind
 end
 
 (** The amount of debug information to emit. *)
diff --git a/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli b/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
index 8a36a2b7d81b1..d759b53642755 100644
--- a/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
+++ b/llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
@@ -148,6 +148,7 @@ module MetadataKind : sig
     | DIArgListMetadataKind
     | DIAssignIDMetadataKind
     | DISubrangeTypeMetadataKind
+    | DIFixedPointTypeMetadataKind
 end
 
 (** The amount of debug information to emit. *)
diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h
index 9fbe31d2629bd..11e0b9b4c81e8 100644
--- a/llvm/include/llvm-c/DebugInfo.h
+++ b/llvm/include/llvm-c/DebugInfo.h
@@ -173,7 +173,6 @@ enum {
   LLVMDISubrangeMetadataKind,
   LLVMDIEnumeratorMetadataKind,
   LLVMDIBasicTypeMetadataKind,
-  LLVMDIFixedPointTypeMetadataKind,
   LLVMDIDerivedTypeMetadataKind,
   LLVMDICompositeTypeMetadataKind,
   LLVMDISubroutineTypeMetadataKind,
@@ -199,6 +198,7 @@ enum {
   LLVMDIArgListMetadataKind,
   LLVMDIAssignIDMetadataKind,
   LLVMDISubrangeTypeMetadataKind,
+  LLVMDIFixedPointTypeMetadataKind,
 };
 typedef unsigned LLVMMetadataKind;
 
diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index d984193875fa2..a67e2b85d9b53 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -212,6 +212,7 @@ if(TARGET ocaml_llvm)
           ocaml_llvm_analysis
           ocaml_llvm_bitreader
           ocaml_llvm_bitwriter
+          ocaml_llvm_debuginfo
           ocaml_llvm_executionengine
           ocaml_llvm_irreader
           ocaml_llvm_linker

``````````

</details>


https://github.com/llvm/llvm-project/pull/134507


More information about the llvm-commits mailing list