Fix Clang -Wcovered-switch-default warning by moving llvm_unreachable default to...
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 25 Oct 2019 01:45:49 +0000 (18:45 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 25 Oct 2019 01:56:45 +0000 (18:56 -0700)
llvm/lib/Analysis/ScalarEvolution.cpp

index f2c2df4..bfb0c0d 100644 (file)
@@ -6607,10 +6607,8 @@ const SCEV *ScalarEvolution::getExitCount(const Loop *L,
     return getBackedgeTakenInfo(L).getExact(ExitingBlock, this);
   case ConstantMaximum:
     return getCouldNotCompute();
-  default:
-    llvm_unreachable("Impossible case!");
   };
-  
+  llvm_unreachable("Invalid ExitCountKind!");
 }
 
 const SCEV *
@@ -6626,9 +6624,8 @@ const SCEV *ScalarEvolution::getBackedgeTakenCount(const Loop *L,
     return getBackedgeTakenInfo(L).getExact(L, this);
   case ConstantMaximum:
     return getBackedgeTakenInfo(L).getMax(this);
-  default:
-    llvm_unreachable("Impossible case!");
   };
+  llvm_unreachable("Invalid ExitCountKind!");
 }
 
 bool ScalarEvolution::isBackedgeTakenCountMaxOrZero(const Loop *L) {