From: David Blaikie Date: Mon, 14 May 2012 21:48:19 +0000 (+0000) Subject: Fix use of uninitialized variable. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9cc178726f323fb859acd7f8fc657a939fe96566;p=oota-llvm.git Fix use of uninitialized variable. Found by GCC's maybe-uninitialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156780 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index d1b481a3b90..f74b0e75cfb 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -2024,7 +2024,7 @@ OptimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg, int CmpMask, ARMCC::CondCodes CC = (ARMCC::CondCodes)OperandsToUpdate[i]->getImm(); ARMCC::CondCodes NewCC; switch (CC) { - default: break; + default: llvm_unreachable("only expecting less/greater comparisons here"); case ARMCC::GE: NewCC = ARMCC::LE; break; case ARMCC::LT: NewCC = ARMCC::GT; break; case ARMCC::GT: NewCC = ARMCC::LT; break;