mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 12:06:36 +00:00
[LLVM-C][OCaml] Make LLVMMetadataKind consistent between C and OCaml (#132268)
- Move LLVMDISubrangeTypeMetadataKind to end of LLVMMetadataKind enum. Inserting a new enum constant in the middle of the enum breaks the ABI for that enum. Commit e298fc2 introduced this issue, which was revealed because the OCaml binding tests failed. - Bring OCaml bindings up to date with LLVMMetadataKind enum.
This commit is contained in:
parent
9d92d4b01c
commit
b32cf75699
@ -139,6 +139,11 @@ module MetadataKind = struct
|
||||
| DIMacroMetadataKind
|
||||
| DIMacroFileMetadataKind
|
||||
| DICommonBlockMetadataKind
|
||||
| DIStringTypeMetadataKind
|
||||
| DIGenericSubrangeMetadataKind
|
||||
| DIArgListMetadataKind
|
||||
| DIAssignIDMetadataKind
|
||||
| DISubrangeTypeMetadataKind
|
||||
end
|
||||
|
||||
(** The amount of debug information to emit. *)
|
||||
|
@ -143,6 +143,11 @@ module MetadataKind : sig
|
||||
| DIMacroMetadataKind
|
||||
| DIMacroFileMetadataKind
|
||||
| DICommonBlockMetadataKind
|
||||
| DIStringTypeMetadataKind
|
||||
| DIGenericSubrangeMetadataKind
|
||||
| DIArgListMetadataKind
|
||||
| DIAssignIDMetadataKind
|
||||
| DISubrangeTypeMetadataKind
|
||||
end
|
||||
|
||||
(** The amount of debug information to emit. *)
|
||||
|
@ -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,
|
||||
@ -172,7 +174,6 @@ enum {
|
||||
LLVMDIEnumeratorMetadataKind,
|
||||
LLVMDIBasicTypeMetadataKind,
|
||||
LLVMDIDerivedTypeMetadataKind,
|
||||
LLVMDISubrangeTypeMetadataKind,
|
||||
LLVMDICompositeTypeMetadataKind,
|
||||
LLVMDISubroutineTypeMetadataKind,
|
||||
LLVMDIFileMetadataKind,
|
||||
@ -196,6 +197,7 @@ enum {
|
||||
LLVMDIGenericSubrangeMetadataKind,
|
||||
LLVMDIArgListMetadataKind,
|
||||
LLVMDIAssignIDMetadataKind,
|
||||
LLVMDISubrangeTypeMetadataKind,
|
||||
};
|
||||
typedef unsigned LLVMMetadataKind;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user