Revert "Revert "ART: Fix up some multi-image cases""
This reverts commit de38b797c3e5ba3ee44c480db7093386975c51eb.
Fix up imgdiag for std::string and multi-image.
Bug: 26317072
Bug: 26320300
Change-Id: I94ce9528e9fea6fb3231a70c32db02d567143db9
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 98aa8d8..5c72629 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -827,13 +827,9 @@
const OatHeader& boot_oat_header = oat_file->GetOatHeader();
const char* boot_cp = boot_oat_header.GetStoreValueByKey(OatHeader::kBootClassPath);
if (boot_cp != nullptr) {
- std::vector<std::string> cp;
- Split(boot_cp, ':', &cp);
-
- if (cp.size() > 1) {
- // More images, enqueue (skipping the first).
- image_locations.insert(image_locations.end(), cp.begin() + 1, cp.end());
- }
+ gc::space::ImageSpace::CreateMultiImageLocations(image_locations[0],
+ boot_cp,
+ &image_locations);
}
}