[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:05 PDT 2025


https://github.com/alan-j-hu created https://github.com/llvm/llvm-project/pull/134507

Fixes breakage of OCaml API introduced by commit 6894734.

>From e16c6ff9ab08336eeabf2d8178c8de491c1183b4 Mon Sep 17 00:00:00 2001
From: Alan Hu <ahulambda at gmail.com>
Date: Sat, 5 Apr 2025 14:03:27 -0400
Subject: [PATCH] [OCaml] Make OCaml MetadataKind type consistent with C API

Fixes breakage of OCaml tests introduced by commit 6894734.
---
 llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml  | 1 +
 llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli | 1 +
 llvm/include/llvm-c/DebugInfo.h                  | 2 +-
 llvm/test/CMakeLists.txt                         | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

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



More information about the llvm-commits mailing list