summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-03-05 07:03:27 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-03-05 07:03:27 +0000
commit65b50272a15c52d753f68df2468fe1792f2516ea (patch)
tree7ec26fcca7d69f9f90966ea699af2eb2c4c71ad9 /compiler/driver/compiler_driver.cc
parent51867b3cdc0481048ea8c22a846932f2a207cf53 (diff)
parent4d4eff794fb8f911d149536f144e589279a51781 (diff)
Merge "ART: Fix compile-time-init fail"
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 029fd46067..a52a83a28a 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -871,6 +871,11 @@ class ClinitImageUpdate {
const char* name = klass->GetDescriptor(&temp);
if (data->image_class_descriptors_->find(name) != data->image_class_descriptors_->end()) {
data->image_classes_.push_back(klass);
+ } else {
+ // Check whether it is initialized and has a clinit. They must be kept, too.
+ if (klass->IsInitialized() && klass->FindClassInitializer() != nullptr) {
+ data->image_classes_.push_back(klass);
+ }
}
return true;