diff options
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
| -rw-r--r-- | compiler/driver/compiler_driver.cc | 5 |
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; |