Delete CodeItemIterator
Replace uses with DexInstructionIterator.
Bug: 63756964
Test: test-art-host-gtest
Change-Id: I28c839c372edcb60583867355d46b14f8752d41b
diff --git a/profman/profman.cc b/profman/profman.cc
index 4c4bb87..ea534f8 100644
--- a/profman/profman.cc
+++ b/profman/profman.cc
@@ -725,15 +725,15 @@
const DexFile::CodeItem* code_item = dex_file->GetCodeItem(offset);
bool found_invoke = false;
- for (CodeItemIterator it(*code_item); !it.Done(); it.Advance()) {
- if (it.CurrentInstruction().Opcode() == Instruction::INVOKE_VIRTUAL) {
+ for (const DexInstructionPcPair& inst : code_item->Instructions()) {
+ if (inst->Opcode() == Instruction::INVOKE_VIRTUAL) {
if (found_invoke) {
LOG(ERROR) << "Multiple invoke INVOKE_VIRTUAL found: "
<< dex_file->PrettyMethod(method_index);
return false;
}
found_invoke = true;
- *dex_pc = it.CurrentDexPc();
+ *dex_pc = inst.DexPc();
}
}
if (!found_invoke) {