summaryrefslogtreecommitdiff
path: root/compiler/optimizing/ssa_builder.cc
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-11-10 11:07:31 +0000
committer David Brazdil <dbrazdil@google.com> 2015-11-10 18:28:21 +0000
commitd26a411adee1e71b3f09dd604ab9b23018037138 (patch)
tree7e9267d50fb0a9bcd6b14a97653c8e0baf91a575 /compiler/optimizing/ssa_builder.cc
parent8a6463a7052ec69e7c0b94a65b26807f570e6359 (diff)
ART: Refactor iteration over normal/exceptional successors
Add helper methods on HBasicBlock which return ArrayRef with the suitable sub-array of the `successors_` list. Change-Id: I66c83bb56f2984d7550bf77c48110af4087515a8
Diffstat (limited to 'compiler/optimizing/ssa_builder.cc')
-rw-r--r--compiler/optimizing/ssa_builder.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/optimizing/ssa_builder.cc b/compiler/optimizing/ssa_builder.cc
index 4565590bc3..5190eb3b26 100644
--- a/compiler/optimizing/ssa_builder.cc
+++ b/compiler/optimizing/ssa_builder.cc
@@ -660,8 +660,7 @@ void SsaBuilder::VisitInstruction(HInstruction* instruction) {
if (instruction->CanThrowIntoCatchBlock()) {
const HTryBoundary& try_entry =
instruction->GetBlock()->GetTryCatchInformation()->GetTryEntry();
- for (HExceptionHandlerIterator it(try_entry); !it.Done(); it.Advance()) {
- HBasicBlock* catch_block = it.Current();
+ for (HBasicBlock* catch_block : try_entry.GetExceptionHandlers()) {
ArenaVector<HInstruction*>* handler_locals = GetLocalsFor(catch_block);
DCHECK_EQ(handler_locals->size(), current_locals_->size());
for (size_t vreg = 0, e = current_locals_->size(); vreg < e; ++vreg) {