Skip to content

[LLVM-C][OCaml] Update OCaml bindings to match LLVMMetadataKind in C API #132268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions llvm/bindings/ocaml/debuginfo/llvm_debuginfo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ module MetadataKind = struct
| DIMacroMetadataKind
| DIMacroFileMetadataKind
| DICommonBlockMetadataKind
| DIStringTypeMetadataKind
| DIGenericSubrangeMetadataKind
| DIArgListMetadataKind
| DIAssignIDMetadataKind
| DISubrangeTypeMetadataKind
end

(** The amount of debug information to emit. *)
Expand Down
5 changes: 5 additions & 0 deletions llvm/bindings/ocaml/debuginfo/llvm_debuginfo.mli
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ module MetadataKind : sig
| DIMacroMetadataKind
| DIMacroFileMetadataKind
| DICommonBlockMetadataKind
| DIStringTypeMetadataKind
| DIGenericSubrangeMetadataKind
| DIArgListMetadataKind
| DIAssignIDMetadataKind
| DISubrangeTypeMetadataKind
end

(** The amount of debug information to emit. *)
Expand Down
4 changes: 3 additions & 1 deletion llvm/include/llvm-c/DebugInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ typedef enum {
/**
* The kind of metadata nodes.
*/
// NOTE: New entries should always be appended instead of matching the order
// in Metadata.def.
enum {
LLVMMDStringMetadataKind,
LLVMConstantAsMetadataMetadataKind,
Expand All @@ -172,7 +174,6 @@ enum {
LLVMDIEnumeratorMetadataKind,
LLVMDIBasicTypeMetadataKind,
LLVMDIDerivedTypeMetadataKind,
LLVMDISubrangeTypeMetadataKind,
LLVMDICompositeTypeMetadataKind,
LLVMDISubroutineTypeMetadataKind,
LLVMDIFileMetadataKind,
Expand All @@ -196,6 +197,7 @@ enum {
LLVMDIGenericSubrangeMetadataKind,
LLVMDIArgListMetadataKind,
LLVMDIAssignIDMetadataKind,
LLVMDISubrangeTypeMetadataKind,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment above this enum that new entries should always be appended instead of matching the order in Metadata.def?

};
typedef unsigned LLVMMetadataKind;

Expand Down
Loading