diff options
author | David Brazdil <dbrazdil@google.com> | 2019-04-25 12:46:32 +0100 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2019-04-25 15:11:08 +0000 |
commit | bad6b1035732ea750435bf933953a3991eade9e3 (patch) | |
tree | dfb27ded0efe5e987d4e40488290db8751b103db | |
parent | 72736d90de9358bdeecf15312ab2398a705d172c (diff) | |
download | art-bad6b1035732ea750435bf933953a3991eade9e3.tar.gz art-bad6b1035732ea750435bf933953a3991eade9e3.tar.bz2 art-bad6b1035732ea750435bf933953a3991eade9e3.zip |
hiddenapi: Error message when superclass not found
Print an error message when building class hierarchy and unable to
find a superclass. This typically means that the provided classpath
is inconsistent (superclass missing), or the order of classes is
incorrect (superclass after child class).
Bug: 131289033
Test: compiles
Merged-In: Ia82755cc90008e974ce22dd2ccced81257ca90f9
Change-Id: Ia82755cc90008e974ce22dd2ccced81257ca90f9
(cherry picked from commit fe9181db92a778c4ef3c4d25e0302553bf970e26)
-rw-r--r-- | tools/hiddenapi/hiddenapi.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/hiddenapi/hiddenapi.cc b/tools/hiddenapi/hiddenapi.cc index 937abd155e..646e4838b3 100644 --- a/tools/hiddenapi/hiddenapi.cc +++ b/tools/hiddenapi/hiddenapi.cc @@ -526,7 +526,11 @@ class Hierarchy final { } HierarchyClass* superclass = FindClass(dex_klass.GetSuperclassDescriptor()); - CHECK(superclass != nullptr); + CHECK(superclass != nullptr) + << "Superclass " << dex_klass.GetSuperclassDescriptor() + << " of class " << dex_klass.GetDescriptor() << " from dex file \"" + << dex_klass.GetDexFile().GetLocation() << "\" was not found. " + << "Either the superclass is missing or it appears later in the classpath spec."; klass.AddExtends(*superclass); for (const std::string_view& iface_desc : dex_klass.GetInterfaceDescriptors()) { |