diff options
| -rw-r--r-- | oatdump/oatdump.cc | 1 | ||||
| -rw-r--r-- | runtime/oat/oat_file.cc | 2 | ||||
| -rw-r--r-- | runtime/oat/oat_file.h | 2 | ||||
| -rw-r--r-- | test/661-oat-writer-layout/oat_writer_layout.cc | 1 |
4 files changed, 2 insertions, 4 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index a93ad37e61..fcd9ddd378 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -265,7 +265,6 @@ class OatSymbolizer final { break; case OatClassType::kNoneCompiled: - case OatClassType::kOatClassMax: // Ignore. break; } diff --git a/runtime/oat/oat_file.cc b/runtime/oat/oat_file.cc index b024523828..6d1b85ec67 100644 --- a/runtime/oat/oat_file.cc +++ b/runtime/oat/oat_file.cc @@ -2328,7 +2328,7 @@ OatFile::OatClass OatDexFile::GetOatClass(uint16_t class_def_index) const { current_pointer += sizeof(uint16_t); CHECK_LE(status_value, enum_cast<uint8_t>(ClassStatus::kLast)) << static_cast<uint32_t>(status_value) << " at " << oat_file_->GetLocation(); - CHECK_LT(type_value, enum_cast<uint8_t>(OatClassType::kOatClassMax)) << oat_file_->GetLocation(); + CHECK_LE(type_value, enum_cast<uint8_t>(OatClassType::kLast)) << oat_file_->GetLocation(); ClassStatus status = enum_cast<ClassStatus>(status_value); OatClassType type = enum_cast<OatClassType>(type_value); diff --git a/runtime/oat/oat_file.h b/runtime/oat/oat_file.h index c165308160..fd1686aa65 100644 --- a/runtime/oat/oat_file.h +++ b/runtime/oat/oat_file.h @@ -75,7 +75,7 @@ enum class OatClassType : uint8_t { kAllCompiled = 0, // OatClass is followed by an OatMethodOffsets for each method. kSomeCompiled = 1, // A bitmap of OatMethodOffsets that are present follows the OatClass. kNoneCompiled = 2, // All methods are interpreted so no OatMethodOffsets are necessary. - kOatClassMax = 3, + kLast = kNoneCompiled }; EXPORT std::ostream& operator<<(std::ostream& os, OatClassType rhs); diff --git a/test/661-oat-writer-layout/oat_writer_layout.cc b/test/661-oat-writer-layout/oat_writer_layout.cc index 6eb056d5db..7302c95b5b 100644 --- a/test/661-oat-writer-layout/oat_writer_layout.cc +++ b/test/661-oat-writer-layout/oat_writer_layout.cc @@ -70,7 +70,6 @@ extern "C" JNIEXPORT jboolean JNICALL Java_Main_hasOatCompiledCode(JNIEnv* env, return true; case OatClassType::kNoneCompiled: - case OatClassType::kOatClassMax: return false; } |