summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/live_ranges_test.cc
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2014-10-09 17:51:36 +0100
committerRoland Levillain <rpl@google.com>2014-10-09 17:59:50 +0100
commit476df557fed5f0b3f32f8d11a654674bb403a8f8 (patch)
tree0ca72785e60b3b1152bca0908e6d134c0a30f631 /compiler/optimizing/live_ranges_test.cc
parent9e878d50567f624094f3c4940ac3aedbc5eff3b9 (diff)
downloadart-476df557fed5f0b3f32f8d11a654674bb403a8f8.zip
art-476df557fed5f0b3f32f8d11a654674bb403a8f8.tar.gz
art-476df557fed5f0b3f32f8d11a654674bb403a8f8.tar.bz2
Use Is*() helpers to shorten code in the optimizing compiler.
Change-Id: I79f31833bc9a0aa2918381aa3fb0b05d45f75689
Diffstat (limited to 'compiler/optimizing/live_ranges_test.cc')
-rw-r--r--compiler/optimizing/live_ranges_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc
index 8be4746..81e2887 100644
--- a/compiler/optimizing/live_ranges_test.cc
+++ b/compiler/optimizing/live_ranges_test.cc
@@ -72,7 +72,7 @@ TEST(LiveRangesTest, CFG1) {
// Last use is the return instruction.
ASSERT_EQ(9u, range->GetEnd());
HBasicBlock* block = graph->GetBlocks().Get(1);
- ASSERT_TRUE(block->GetLastInstruction()->AsReturn() != nullptr);
+ ASSERT_TRUE(block->GetLastInstruction()->IsReturn());
ASSERT_EQ(8u, block->GetLastInstruction()->GetLifetimePosition());
ASSERT_TRUE(range->GetNext() == nullptr);
}
@@ -118,7 +118,7 @@ TEST(LiveRangesTest, CFG2) {
// Last use is the return instruction.
ASSERT_EQ(23u, range->GetEnd());
HBasicBlock* block = graph->GetBlocks().Get(3);
- ASSERT_TRUE(block->GetLastInstruction()->AsReturn() != nullptr);
+ ASSERT_TRUE(block->GetLastInstruction()->IsReturn());
ASSERT_EQ(22u, block->GetLastInstruction()->GetLifetimePosition());
ASSERT_TRUE(range->GetNext() == nullptr);
}