From 0e8fc21c2ec780297dfd7fd643b171857c45d7a3 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 24 Oct 2019 18:45:49 -0700 Subject: Fix Clang -Wcovered-switch-default warning by moving llvm_unreachable default to after the switch --- llvm/lib/Analysis/ScalarEvolution.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp') diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index f2c2df4879f..bfb0c0dfb60 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -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) { -- cgit v1.2.3