summaryrefslogtreecommitdiffstats
path: root/compiler
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2015-03-20 18:11:45 -0700
committerJeff Hao <jeffhao@google.com>2015-03-20 18:40:32 -0700
commit9ccd151d0d27a729f88af9d00285afe4d147981a (patch)
treeedfef268a0ecda957dfaa91ec35dd99c9ad3761f /compiler
parent3743174267159ec0c39bce1ca28c2081468dda94 (diff)
downloadart-9ccd151d0d27a729f88af9d00285afe4d147981a.zip
art-9ccd151d0d27a729f88af9d00285afe4d147981a.tar.gz
art-9ccd151d0d27a729f88af9d00285afe4d147981a.tar.bz2
Fix verifier handling of empty switch as last instruction.
Also fixes optimizing compiler's assumption that switch is non-empty and adds test case. Bug: 19827056 Change-Id: I5ac891d5062f528ef3be787b1094cba7b4c0fbd0
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/builder.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 2cac93d..ec7fd62 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -1024,8 +1024,6 @@ void HGraphBuilder::BuildSparseSwitch(const Instruction& instruction, uint32_t d
HInstruction* value = LoadLocal(instruction.VRegA(), Primitive::kPrimInt);
uint16_t num_entries = table.GetNumEntries();
- // There should be at least one entry here.
- DCHECK_GT(num_entries, 0U);
for (size_t i = 0; i < num_entries; i++) {
BuildSwitchCaseHelper(instruction, i, i == static_cast<size_t>(num_entries) - 1, table, value,