summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-11-23 09:53:22 +0000
committer android-build-merger <android-build-merger@google.com> 2015-11-23 09:53:22 +0000
commitf01e70d21414a14ff0d85565560289f207744e01 (patch)
treef75c288d909fc7b86b005e6780113273249bd9e3 /compiler/optimizing
parent0af5e3b30f2a118530c750943dd4de9b0a383aea (diff)
parent911542ed69dbb8bc2fc1132c71261cc741b7afb3 (diff)
Merge "ART: Fix uninitialized variable"
am: 911542ed69 * commit '911542ed69dbb8bc2fc1132c71261cc741b7afb3': ART: Fix uninitialized variable
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/nodes.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 1680c07776..890598d687 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -2099,7 +2099,7 @@ HInstruction* HGraph::InsertOppositeCondition(HInstruction* cond, HInstruction*
// Can't reverse floating point conditions. We have to use HBooleanNot in that case.
HInstruction* lhs = cond->InputAt(0);
HInstruction* rhs = cond->InputAt(1);
- HInstruction* replacement;
+ HInstruction* replacement = nullptr;
switch (cond->AsCondition()->GetOppositeCondition()) { // get *opposite*
case kCondEQ: replacement = new (allocator) HEqual(lhs, rhs); break;
case kCondNE: replacement = new (allocator) HNotEqual(lhs, rhs); break;
@@ -2111,6 +2111,9 @@ HInstruction* HGraph::InsertOppositeCondition(HInstruction* cond, HInstruction*
case kCondBE: replacement = new (allocator) HBelowOrEqual(lhs, rhs); break;
case kCondA: replacement = new (allocator) HAbove(lhs, rhs); break;
case kCondAE: replacement = new (allocator) HAboveOrEqual(lhs, rhs); break;
+ default:
+ LOG(FATAL) << "Unexpected condition";
+ UNREACHABLE();
}
cursor->GetBlock()->InsertInstructionBefore(replacement, cursor);
return replacement;