summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-07-25 01:16:44 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-07-25 01:16:44 +0000
commite88c2d244c4d6359f731f6fab0d09aec218a1a46 (patch)
treece95ffd3744e9ad7409d831efc4c8407b327229b /compiler/driver/compiler_driver.cc
parentaf89a91f05e849a06abfd50b8a2e1d2d81357abd (diff)
parent010f5ccfb666994c8c65d5b4f8a15208da3aee39 (diff)
Merge "Allow failure in RecordClassStatus for uses-library classes"
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index da375b64b9..ed36e111ff 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2905,7 +2905,17 @@ void CompilerDriver::RecordClassStatus(ClassReference ref, mirror::Class::Status
do {
DexFileReference dex_ref(ref.first, ref.second);
mirror::Class::Status existing = mirror::Class::kStatusNotReady;
- CHECK(compiled_classes_.Get(dex_ref, &existing)) << dex_ref.dex_file->GetLocation();
+ if (!compiled_classes_.Get(dex_ref, &existing)) {
+ // Probably a uses library class, bail.
+ if (kIsDebugBuild) {
+ // Check to make sure it's not a dex file for an oat file we are compiling since these
+ // should always succeed. These do not include classes in for used libraries.
+ for (const DexFile* dex_file : *dex_files_for_oat_file_) {
+ CHECK_NE(dex_ref.dex_file, dex_file) << dex_ref.dex_file->GetLocation();
+ }
+ }
+ return;
+ }
if (existing >= status) {
// Existing status is already better than we expect, break.
break;