header-abi-diff takes two input dumps produced by header-abi-dumper and
produces an abi compatiblity report.
header-abi-dumper, header-abi-linker now produce dumps formatted only in
protobuf TextFormat.
Test: Dump the abi exposed by test/input/example1.cpp. Add fields, change
return types of functions and dump the abi of this version. Produce the
compatibility report by: header-abi-diff -old <ver1-dump> -new <ver2-dump>
-o <compatibility-report>.
Also tested changing the abi of libjpeg, and comparing a reference
dump with the new dump. An Abi breakage is reported.
Bug: 32750600
Change-Id: I5444912d84de726aaa18977ca9162162aa13b760
74 lines
2.4 KiB
Protocol Buffer
74 lines
2.4 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package abi_dump;
|
|
|
|
message FunctionDecl {
|
|
// Fully Qualified Name.
|
|
optional string function_name = 1 [default = "NONE"];
|
|
|
|
// Mangled name.
|
|
optional string mangled_function_name = 2 [default = "NONE"];
|
|
|
|
optional string source_file = 3;
|
|
optional string parent_name = 4 [default = "NONE"];
|
|
repeated string template_arguments = 5 ;
|
|
repeated FieldDecl parameters = 6;
|
|
optional string return_type = 7 [default = "VOID"];
|
|
optional string access = 8 [default = "public"];
|
|
optional uint32 template_kind = 9 [default = 0];
|
|
optional TemplateInfo template_info = 10;
|
|
optional string linker_set_key = 11 [default = "NONE"];
|
|
}
|
|
|
|
message FieldDecl {
|
|
optional string field_name = 1 [default = "NONE"];
|
|
optional string field_type = 2 [default = "VOID"];
|
|
optional string access = 3 [default = "public"];
|
|
optional bool default_arg = 4 [default = false];
|
|
optional string linker_set_key = 5 [default = "NONE"];
|
|
}
|
|
|
|
message EnumFieldDecl {
|
|
optional string enum_field_name = 1 [default = "NONE"];
|
|
optional int64 enum_field_value = 2 [default = 0]; // assumption: fits int64
|
|
optional string linker_set_key = 3 [default = "NONE"];
|
|
}
|
|
|
|
message TemplateInfo {
|
|
repeated FieldDecl template_parameters = 1;
|
|
}
|
|
|
|
message CXXBaseSpecifier {
|
|
optional string fully_qualified_name = 1 [default = "NONE"];
|
|
optional string access = 2 [default = "public"];
|
|
optional bool is_virtual = 3 [default = false];
|
|
optional string linker_set_key = 4 [default = "NONE"];
|
|
}
|
|
|
|
message RecordDecl {
|
|
repeated FieldDecl fields = 1;
|
|
repeated CXXBaseSpecifier base_specifiers = 2;
|
|
optional string fully_qualified_name = 3 [default = "NONE"];
|
|
optional string source_file = 4 [default = "NONE"];
|
|
optional uint32 template_kind = 5 [default = 0];
|
|
optional TemplateInfo template_info = 6;
|
|
optional string access = 7 [default = "public"];
|
|
optional string linker_set_key = 8 [default = "NONE"];
|
|
optional string mangled_record_name = 9 [default = "NONE"];
|
|
}
|
|
|
|
message EnumDecl {
|
|
optional string enum_name = 1 [default = "NONE"];
|
|
optional string access = 2 [default = "public"];
|
|
optional string enum_type = 3 [default = "int"];
|
|
repeated EnumFieldDecl enum_fields = 4;
|
|
optional string source_file = 5 [default = "NONE"];
|
|
optional string linker_set_key = 6 [default = "NONE"];
|
|
}
|
|
|
|
message TranslationUnit {
|
|
repeated RecordDecl records = 1;
|
|
repeated FunctionDecl functions = 2;
|
|
repeated EnumDecl enums = 3;
|
|
}
|