@@ -11,6 +11,15 @@ pub enum Abi {
11
11
// N.B., this ordering MUST match the AbiDatas array below.
12
12
// (This is ensured by the test indices_are_correct().)
13
13
14
+ // Multiplatform / generic ABIs
15
+ //
16
+ // These ABIs come first because every time we add a new ABI, we
17
+ // have to re-bless all the hashing tests. These are used in many
18
+ // places, so giving them stable values reduces test churn. The
19
+ // specific values are meaningless.
20
+ Rust = 0 ,
21
+ C = 1 ,
22
+
14
23
// Single platform ABIs
15
24
Cdecl ,
16
25
Stdcall ,
@@ -27,8 +36,6 @@ pub enum Abi {
27
36
EfiApi ,
28
37
29
38
// Multiplatform / generic ABIs
30
- Rust ,
31
- C ,
32
39
System ,
33
40
RustIntrinsic ,
34
41
RustCall ,
@@ -49,6 +56,9 @@ pub struct AbiData {
49
56
50
57
#[ allow( non_upper_case_globals) ]
51
58
const AbiDatas : & [ AbiData ] = & [
59
+ // Cross-platform ABIs
60
+ AbiData { abi : Abi :: Rust , name : "Rust" , generic : true } ,
61
+ AbiData { abi : Abi :: C , name : "C" , generic : true } ,
52
62
// Platform-specific ABIs
53
63
AbiData { abi : Abi :: Cdecl , name : "cdecl" , generic : false } ,
54
64
AbiData { abi : Abi :: Stdcall , name : "stdcall" , generic : false } ,
@@ -64,8 +74,6 @@ const AbiDatas: &[AbiData] = &[
64
74
AbiData { abi : Abi :: AmdGpuKernel , name : "amdgpu-kernel" , generic : false } ,
65
75
AbiData { abi : Abi :: EfiApi , name : "efiapi" , generic : false } ,
66
76
// Cross-platform ABIs
67
- AbiData { abi : Abi :: Rust , name : "Rust" , generic : true } ,
68
- AbiData { abi : Abi :: C , name : "C" , generic : true } ,
69
77
AbiData { abi : Abi :: System , name : "system" , generic : true } ,
70
78
AbiData { abi : Abi :: RustIntrinsic , name : "rust-intrinsic" , generic : true } ,
71
79
AbiData { abi : Abi :: RustCall , name : "rust-call" , generic : true } ,
0 commit comments