Make ImageWriter tolerant of image classes implicitly loaded by <clinit>s.
Change-Id: I2cacd47ef63c64c6f48d5a696ec994b63f01f237
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index 292e41c..0567788 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -162,7 +162,7 @@
// Make a list of descriptors for classes to include in the image
- const std::set<std::string>* GetImageClassDescriptors(const char* image_classes_filename)
+ std::set<std::string>* GetImageClassDescriptors(const char* image_classes_filename)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
UniquePtr<std::ifstream> image_classes_file(new std::ifstream(image_classes_filename, std::ifstream::in));
if (image_classes_file.get() == NULL) {
@@ -313,7 +313,7 @@
bool CreateImageFile(const std::string& image_filename,
uintptr_t image_base,
- const std::set<std::string>* image_classes,
+ std::set<std::string>* image_classes,
const std::string& oat_filename,
const std::string& oat_location,
const CompilerDriver& compiler)
@@ -934,7 +934,7 @@
ScopedObjectAccess soa(Thread::Current());
// If --image-classes was specified, calculate the full list of classes to include in the image
- UniquePtr<const std::set<std::string> > image_classes(NULL);
+ UniquePtr<std::set<std::string> > image_classes(NULL);
if (image_classes_filename != NULL) {
image_classes.reset(dex2oat->GetImageClassDescriptors(image_classes_filename));
if (image_classes.get() == NULL) {