aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuliano Procida <gprocida@google.com>2022-02-23 18:43:45 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-23 18:43:45 +0000
commitd7e59a5af28625feb2b9fb90317635444f7f7bbb (patch)
tree0a48ace6447711bd66dd42fafd8da183eb192624
parent7216f474935412335771840c2637d7f4cbc57fd7 (diff)
parent075b1a0c1265707d1ae0c08fd69c618020f5a1d8 (diff)
downloadlibabigail-android13-mainline-adservices-release.tar.gz
Original change: https://android-review.googlesource.com/c/platform/external/libabigail/+/1996592 Change-Id: Ica076b9f47176347108cc0307180ee374a72c467
-rw-r--r--tools/abitidy.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/abitidy.cc b/tools/abitidy.cc
index a8e0f910..0a664e49 100644
--- a/tools/abitidy.cc
+++ b/tools/abitidy.cc
@@ -1269,11 +1269,11 @@ main(int argc, char* argv[])
int opt_indentation = 2;
bool opt_normalise_anonymous = false;
bool opt_reanonymise_anonymous = false;
- bool opt_clear_non_reachable = false;
bool opt_discard_naming_typedefs = false;
bool opt_prune_unreachable = false;
bool opt_report_untyped = false;
bool opt_abort_on_untyped = false;
+ bool opt_clear_non_reachable = false;
bool opt_eliminate_duplicates = false;
bool opt_report_conflicts = false;
bool opt_sort = false;
@@ -1287,14 +1287,14 @@ main(int argc, char* argv[])
<< " [-S|--symbols file]\n"
<< " [-L|--locations {column|line|file|none}]\n"
<< " [-I|--indentation n]\n"
- << " [-a|--all] (implies -n -r -b -t -p -u -e -c -s -d)\n"
+ << " [-a|--all] (implies -n -r -t -p -u -b -e -c -s -d)\n"
<< " [-n|--[no-]normalise-anonymous]\n"
<< " [-r|--[no-]reanonymise-anonymous]\n"
- << " [-b|--[no-]clear-non-reachable]\n"
<< " [-t|--[no-]discard-naming-typedefs]\n"
<< " [-p|--[no-]prune-unreachable]\n"
<< " [-u|--[no-]report-untyped]\n"
<< " [-U|--abort-on-untyped-symbols]\n"
+ << " [-b|--[no-]clear-non-reachable]\n"
<< " [-e|--[no-]eliminate-duplicates]\n"
<< " [-c|--[no-]report-conflicts]\n"
<< " [-s|--[no-]sort]\n"
@@ -1333,9 +1333,9 @@ main(int argc, char* argv[])
else if (arg == "-a" || arg == "--all")
opt_normalise_anonymous = opt_reanonymise_anonymous
= opt_discard_naming_typedefs
- = opt_clear_non_reachable
= opt_prune_unreachable
= opt_report_untyped
+ = opt_clear_non_reachable
= opt_eliminate_duplicates
= opt_report_conflicts
= opt_sort
@@ -1349,10 +1349,6 @@ main(int argc, char* argv[])
opt_reanonymise_anonymous = true;
else if (arg == "--no-reanonymise-anonymous")
opt_reanonymise_anonymous = false;
- else if (arg == "-b" || arg == "--clear-non-reachable")
- opt_clear_non_reachable = true;
- else if (arg == "--no-clear-non-reachable")
- opt_clear_non_reachable = false;
else if (arg == "-t" || arg == "--discard-naming-typedefs")
opt_discard_naming_typedefs = true;
else if (arg == "--no-discard-naming-typedefs")
@@ -1367,6 +1363,10 @@ main(int argc, char* argv[])
opt_report_untyped = false;
else if (arg == "-U" || arg == "--abort-on-untyped-symbols")
opt_abort_on_untyped = true;
+ else if (arg == "-b" || arg == "--clear-non-reachable")
+ opt_clear_non_reachable = true;
+ else if (arg == "--no-clear-non-reachable")
+ opt_clear_non_reachable = false;
else if (arg == "-e" || arg == "--eliminate-duplicates")
opt_eliminate_duplicates = true;
else if (arg == "--no-eliminate-duplicates")
@@ -1435,10 +1435,6 @@ main(int argc, char* argv[])
handle_anonymous_types(opt_normalise_anonymous, opt_reanonymise_anonymous,
opt_discard_naming_typedefs, root);
- // Clear unwanted non-reachable attributes.
- if (opt_clear_non_reachable)
- clear_non_reachable(root);
-
// Prune unreachable elements and/or report untyped symbols.
size_t untyped_symbols = 0;
if (opt_prune_unreachable || opt_report_untyped || opt_abort_on_untyped)
@@ -1454,6 +1450,10 @@ main(int argc, char* argv[])
if (opt_locations > LocationInfo::COLUMN)
limit_locations(opt_locations, root);
+ // Clear unwanted non-reachable attributes.
+ if (opt_clear_non_reachable)
+ clear_non_reachable(root);
+
// Eliminate complete duplicates and extra fragments of types.
// Report conflicting type defintions.
// Record whether there are namespace scope conflicts.