1) Types are now quantifed into one of the following:
a) RecordType - structures/ unions/ classes.
b) EnumType - enumerated types.
c) QualifiedType - types with qualifiers intact.
d) PointerType - pointer to a type.
e) LvalueReferenceType
f) RvalueReferenceType
g) ArrayType
2) ABI diffing now diffs based on types directly / indirectly reachable
by function signatures / global variable types by default. Also added an option
to header-abi-diff:
-check-all-apis : Include changes to all APIs exported via exported
headers whether directly / indirectly used by function signatures /
global variable types or not.
3) Introduced an internal representation of abi information. This
enables us to switch formats of abi-dumps / abi-diffs more easily
without changing the AST parsing code. For example: In the future, if we
wanted to add options to view the abi-dumps in html / xml we could just
add classes which extended IRDumper and implement dumping methods.
4) The linked ABI dump of a shared library also includes a list of the
exported functions and objects collected from the .dynsym table. This makes it
possible to avoid false reports of ABI breakages when functions/ global
variables are moved to assembly files.
Test: abi-dumping and linking: make -j64 from ToT
abi_diffing: change parameter types directly, indirectly.
Ran tests/test.py with soong running the built tool, all tests passed.
Bug: 62060883
Bug: 63865902
Change-Id: Id9ef757165a1669049fde20bda4147d5074cc191
1) clang segfaults on trying to mangle a global variable name who's type is
a dependent sized array type.
2) Sizes of auto types are not deducible.
3) Do not look at source files for exported abi.
Test: header-abi-dumper -o example1.dump tests/input/example1.cpp -I tests --
-x c++ -std=c++11 -I . -I ~/android/aosp/external/clang/lib/Headers
Change-Id: I9fcab6c8bf82df2aace0161b14f397f34ef0d51e
Make Messages mirror clang Types better.
Added type size and alignments for independent and complete types.
Added vtable layout for CXXRecordDecls.
Added abi information for variables with global storage.
Added new return status to signify abi extension.
Added checks for access specifier downgrades.
Removed repeated code from header-abi-diff.
Test: header-abi-dumper -o example1.dump tests/input/example1.cpp -I
tests -- -x c++ -std=c++11 -I . -I
~/android/aosp/external/clang/lib/Headers
Change-Id: I21b5a8ef6dff92ecae47a0b1c46342862c5e0ebd
header-abi-linker links dumps produced by header-abi-dumper when it goes
over each source file in a vndk shared library. It simply looks at the
"mlinker_set_key" field of the protobuf message to do this.
Only abi information present in source files in "export_include_headers"
is dumped now. If a library does not export headers it's abi is not
dumped.
Added information about anonymous records. eg: typedef struct {} Foo;
Test: header-abi-dumper -o example1.dump tests/input/example1.cpp -I tests --
-x c++ -std=c++11 -I . -I ~/android/aosp/external/clang/lib/Headers/
Bug: 32750600
Change-Id: I692de0933349a6b80a6b1a3b605a377a25cd0b5a