[llvm] r333967 - Fix -Wcovered-switch-default warning and clang-format it
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 4 16:47:30 PDT 2018
Author: rnk
Date: Mon Jun 4 16:47:29 2018
New Revision: 333967
URL: http://llvm.org/viewvc/llvm-project?rev=333967&view=rev
Log:
Fix -Wcovered-switch-default warning and clang-format it
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=333967&r1=333966&r2=333967&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Jun 4 16:47:29 2018
@@ -2196,16 +2196,14 @@ SDValue DAGCombiner::visitADDC(SDNode *N
static SDValue flipBoolean(SDValue V, const SDLoc &DL, EVT VT,
SelectionDAG &DAG, const TargetLowering &TLI) {
SDValue Cst;
- switch(TLI.getBooleanContents(VT)) {
- case TargetLowering::ZeroOrOneBooleanContent:
- case TargetLowering::UndefinedBooleanContent:
- Cst = DAG.getConstant(1, DL, VT);
- break;
- case TargetLowering::ZeroOrNegativeOneBooleanContent:
- Cst = DAG.getConstant(-1, DL, VT);
- break;
- default:
- llvm_unreachable("Unsupported boolean content");
+ switch (TLI.getBooleanContents(VT)) {
+ case TargetLowering::ZeroOrOneBooleanContent:
+ case TargetLowering::UndefinedBooleanContent:
+ Cst = DAG.getConstant(1, DL, VT);
+ break;
+ case TargetLowering::ZeroOrNegativeOneBooleanContent:
+ Cst = DAG.getConstant(-1, DL, VT);
+ break;
}
return DAG.getNode(ISD::XOR, DL, VT, V, Cst);
More information about the llvm-commits
mailing list