• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto2";
2
3import "abi_dump.proto";
4
5package abi_diff;
6
7message TypeInfo {
8  optional uint64 size = 1;
9  optional uint32 alignment = 2;
10}
11
12message TypeInfoDiff {
13  optional TypeInfo old_type_info  = 1;
14  optional TypeInfo new_type_info  = 2;
15}
16
17message VTableLayoutDiff {
18  optional abi_dump.VTableLayout old_vtable = 1;
19  optional abi_dump.VTableLayout new_vtable = 2;
20}
21
22message RecordFieldDeclDiff {
23  optional abi_dump.RecordFieldDecl old_field = 1;
24  optional abi_dump.RecordFieldDecl new_field = 2;
25}
26
27message CXXBaseSpecifierDiff {
28  repeated abi_dump.CXXBaseSpecifier old_bases = 1;
29  repeated abi_dump.CXXBaseSpecifier new_bases = 2;
30}
31
32message RecordTypeDiff {
33  optional string name = 1;
34  optional string type_stack = 2;
35  optional TypeInfoDiff type_info_diff = 3;
36  repeated abi_dump.RecordFieldDecl fields_removed = 4;
37  repeated abi_dump.RecordFieldDecl fields_added = 5;
38  repeated RecordFieldDeclDiff fields_diff = 6;
39  optional CXXBaseSpecifierDiff bases_diff = 7;
40  optional VTableLayoutDiff vtable_layout_diff = 8;
41}
42
43message UnderlyingTypeDiff {
44  optional string old_type  = 1;
45  optional string new_type  = 2;
46}
47
48message EnumFieldDeclDiff {
49  optional abi_dump.EnumFieldDecl old_field = 1;
50  optional abi_dump.EnumFieldDecl new_field = 2;
51}
52
53message EnumTypeDiff {
54  optional string type_stack = 1;
55  optional string name = 2;
56  repeated EnumFieldDeclDiff fields_diff = 3;
57  optional UnderlyingTypeDiff underlying_type_diff = 4;
58  repeated abi_dump.EnumFieldDecl fields_added = 5;
59  repeated abi_dump.EnumFieldDecl fields_removed = 6;
60}
61
62message FunctionDeclDiff {
63  // Template diffs are not required since in C++, they will show up in mangled
64  // names and in C, templates are not supported.
65  optional string type_stack = 1;
66  optional string name = 2;
67  optional abi_dump.FunctionDecl old = 3;
68  optional abi_dump.FunctionDecl new = 4;
69}
70
71message GlobalVarDeclDiff {
72  optional string type_stack = 1;
73  optional string name = 2;
74  optional abi_dump.GlobalVarDecl old = 3;  // Old global var
75  optional abi_dump.GlobalVarDecl new = 4;  // New global var
76}
77
78message TranslationUnitDiff {
79  // Library Name
80  optional string lib_name = 1;
81  optional string arch = 2;
82  // Records.
83  repeated RecordTypeDiff record_type_diffs = 3;
84  repeated RecordTypeDiff unreferenced_record_type_diffs = 4;
85  repeated abi_dump.RecordType unreferenced_record_types_removed = 5;
86  repeated abi_dump.RecordType unreferenced_record_types_added = 6;
87
88  // Enums
89  repeated EnumTypeDiff enum_type_diffs = 7;
90  repeated EnumTypeDiff enum_type_extension_diffs = 8;
91  repeated EnumTypeDiff unreferenced_enum_type_diffs = 9;
92  repeated EnumTypeDiff unreferenced_enum_type_extension_diffs = 10;
93  repeated abi_dump.EnumType unreferenced_enum_types_removed = 11;
94  repeated abi_dump.EnumType unreferenced_enum_types_added = 12;
95
96  // Functions and Global variables.
97  repeated FunctionDeclDiff function_diffs = 13;
98  repeated GlobalVarDeclDiff global_var_diffs = 14;
99
100  repeated abi_dump.FunctionDecl functions_removed = 15;
101  repeated abi_dump.GlobalVarDecl global_vars_removed = 16;
102
103  repeated abi_dump.FunctionDecl functions_added = 17;
104  repeated abi_dump.GlobalVarDecl global_vars_added = 18;
105
106  repeated abi_dump.ElfFunction added_elf_functions = 19;
107  repeated abi_dump.ElfFunction removed_elf_functions = 20;
108
109  repeated abi_dump.ElfObject added_elf_objects = 21;
110  repeated abi_dump.ElfObject removed_elf_objects = 22;
111
112  // Compatiblity Status
113  optional CompatibilityStatus compatibility_status = 23;
114}
115
116// Not merged with TranslationUnitDiff to allow future extensions.
117message ConciseDiffReportInformation {
118  optional string lib_name = 1;
119  optional string arch = 2;
120  optional string diff_report_path = 3;
121  optional CompatibilityStatus compatibility_status = 4;
122}
123
124message MergedTranslationUnitDiff {
125  repeated ConciseDiffReportInformation diff_reports = 1;
126}
127
128enum CompatibilityStatus {
129  COMPATIBLE = 0;
130  EXTENSION = 1;
131  INCOMPATIBLE = 4;
132}
133