]> granicus.if.org Git - llvm/commitdiff
Fix clang -Wcovered-switch-default after stack-id change by D60137
authorFangrui Song <maskray@google.com>
Mon, 17 Jun 2019 10:20:20 +0000 (10:20 +0000)
committerFangrui Song <maskray@google.com>
Mon, 17 Jun 2019 10:20:20 +0000 (10:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363543 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIFrameLowering.cpp

index f6dadb7b11db520a5dba4e936000996d06204dd0..ca2fcfa036f3444c5ad273d6fe782dee8f66a2e7 100644 (file)
@@ -545,14 +545,13 @@ static unsigned findScratchNonCalleeSaveRegister(MachineFunction &MF,
 }
 
 bool SIFrameLowering::isSupportedStackID(TargetStackID::Value ID) const {
-    switch (ID) {
-    default:
-      return false;
-    case TargetStackID::Default:
-    case TargetStackID::NoAlloc:
-    case TargetStackID::SGPRSpill:
-      return true;
-    }
+  switch (ID) {
+  case TargetStackID::Default:
+  case TargetStackID::NoAlloc:
+  case TargetStackID::SGPRSpill:
+    return true;
+  }
+  llvm_unreachable("Invalid TargetStackID::Value");
 }
 
 void SIFrameLowering::emitPrologue(MachineFunction &MF,