[llvm] r219531 - [mips] Actually mark that the default case is unreachable as this switch
Chandler Carruth
chandlerc at gmail.com
Fri Oct 10 14:07:03 PDT 2014
Author: chandlerc
Date: Fri Oct 10 16:07:03 2014
New Revision: 219531
URL: http://llvm.org/viewvc/llvm-project?rev=219531&view=rev
Log:
[mips] Actually mark that the default case is unreachable as this switch
is over a subset of condition codes.
This fixes the -Werror build which warns about use of uninitialized
variables in the default case.
Modified:
llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsFastISel.cpp?rev=219531&r1=219530&r2=219531&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsFastISel.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsFastISel.cpp Fri Oct 10 16:07:03 2014
@@ -673,7 +673,7 @@ bool MipsFastISel::SelectCmp(const Instr
CondMovOpc = Mips::MOVF_I;
break;
default:
- break;
+ llvm_unreachable("Only switching of a subset of CCs.");
}
unsigned RegWithZero = createResultReg(&Mips::GPR32RegClass);
unsigned RegWithOne = createResultReg(&Mips::GPR32RegClass);
More information about the llvm-commits
mailing list