Store OatDexFile instead of OatFile in DexFile.
This requires moving OatDexFile out of the OatFile class so that
a forward class declaration can be used for OatDexFile.
Bug: 19071355
Change-Id: Ibda85b78d0577e9e81073090616fc0f2fa526be3
diff --git a/runtime/oat_file.cc b/runtime/oat_file.cc
index 69cb22d..81703b1 100644
--- a/runtime/oat_file.cc
+++ b/runtime/oat_file.cc
@@ -453,7 +453,7 @@
std::unique_ptr<const DexFile> OatFile::OatDexFile::OpenDexFile(std::string* error_msg) const {
return DexFile::Open(dex_file_pointer_, FileSize(), dex_file_location_,
- dex_file_location_checksum_, GetOatFile(), error_msg);
+ dex_file_location_checksum_, this, error_msg);
}
uint32_t OatFile::OatDexFile::GetOatClassOffset(uint16_t class_def_index) const {
@@ -495,12 +495,12 @@
CHECK_LE(methods_pointer, oat_file_->End()) << oat_file_->GetLocation();
}
- return OatClass(oat_file_,
- status,
- type,
- bitmap_size,
- reinterpret_cast<const uint32_t*>(bitmap_pointer),
- reinterpret_cast<const OatMethodOffsets*>(methods_pointer));
+ return OatFile::OatClass(oat_file_,
+ status,
+ type,
+ bitmap_size,
+ reinterpret_cast<const uint32_t*>(bitmap_pointer),
+ reinterpret_cast<const OatMethodOffsets*>(methods_pointer));
}
OatFile::OatClass::OatClass(const OatFile* oat_file,