[llvm] d7803c3 - Add default case to fix -Wswitch errors

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 14:24:28 PST 2020


Author: Jordan Rupprecht
Date: 2020-03-02T14:23:46-08:00
New Revision: d7803c38327dbc8d047c542b5acda0bb946a4008

URL: https://github.com/llvm/llvm-project/commit/d7803c38327dbc8d047c542b5acda0bb946a4008
DIFF: https://github.com/llvm/llvm-project/commit/d7803c38327dbc8d047c542b5acda0bb946a4008.diff

LOG: Add default case to fix -Wswitch errors

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 28a0eb6e3724..eafa0974a735 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -3871,6 +3871,7 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
         case ISD::SETUEQ: NewCond = IsNegInf ? ISD::SETULE : ISD::SETUGE; break;
         case ISD::SETUNE: NewCond = IsNegInf ? ISD::SETUGT : ISD::SETULT; break;
         case ISD::SETONE: NewCond = IsNegInf ? ISD::SETOGT : ISD::SETOLT; break;
+        default: break;
         }
         if (NewCond != ISD::SETCC_INVALID &&
             isCondCodeLegal(NewCond, N0.getSimpleValueType()))


        


More information about the llvm-commits mailing list