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