diff options
author | Jooyung Han <jooyung@google.com> | 2022-12-21 16:53:56 +0900 |
---|---|---|
committer | Jooyung Han <jooyung@google.com> | 2022-12-22 03:45:48 +0000 |
commit | 833fbf46f949dbb450e715dbdfe1411f56aa5d3a (patch) | |
tree | 0e8831f69adacd00b0250922daa3198270cc3773 /aidl_checkapi.cpp | |
parent | 4449a1fc4e9f7122a33b132bf1fec0891dc1b1dd (diff) | |
download | aidl-833fbf46f949dbb450e715dbdfe1411f56aa5d3a.tar.gz |
--dumpapi doesn't inline constants
Due to constant inlining, some AIDL types referencing other type's
constants lose the type references in the snapshot. This causes CPP/NDK
clients relying on the fact of including headers of referenced types
break after *-freeze-api.
(See the REPRO in Iab358e15d4400fb43ec9d2812ac37c32af127323)
Now, constant references are not inlined when creating API dumps.
Bug: 262594867
Test: aidl_unittests
Test: m client-using-test-piece-3 # OK
m test-piece-3-freeze-api # OK
m client-using-test-piece-3 # OK
Change-Id: I4e8d8e03c70c6168942bcd95b7db39c29c65aeea
Diffstat (limited to 'aidl_checkapi.cpp')
-rw-r--r-- | aidl_checkapi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/aidl_checkapi.cpp b/aidl_checkapi.cpp index c1d3c66b..584e5a66 100644 --- a/aidl_checkapi.cpp +++ b/aidl_checkapi.cpp @@ -44,7 +44,7 @@ using std::vector; static std::string Dump(const AidlDefinedType& type) { string code; CodeWriterPtr out = CodeWriter::ForString(&code); - DumpVisitor visitor(*out); + DumpVisitor visitor(*out, /*inline_constants=*/true); type.DispatchVisit(visitor); out->Close(); return code; |