[llvm] 92ef101 - [IR] Remove switch's default block that causes clang 8 raise error

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 23:32:07 PST 2019


Author: aqjune
Date: 2019-11-05T16:31:51+09:00
New Revision: 92ef101da91d39525043034694b3088d0a08f43f

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

LOG: [IR] Remove switch's default block that causes clang 8 raise error

Added: 
    

Modified: 
    llvm/lib/IR/ConstantFold.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 218a25fdfff6..84f86523de58 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -942,8 +942,6 @@ Constant *llvm::ConstantFoldUnaryInstruction(unsigned Opcode, Constant *C) {
   assert(Instruction::isUnaryOp(Opcode) && "Non-unary instruction detected");
 
   switch (static_cast<Instruction::UnaryOps>(Opcode)) {
-  default:
-    break;
   case Instruction::FNeg: {
     // Handle scalar UndefValue. Vectors are always evaluated per element.
     bool HasScalarUndef = !C->getType()->isVectorTy() && isa<UndefValue>(C);


        


More information about the llvm-commits mailing list