R600: silence GCC warning
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 21 Jul 2014 17:52:00 +0000 (17:52 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 21 Jul 2014 17:52:00 +0000 (17:52 +0000)
GCC believes it may be possible to not return a value from the switch:
  lib/Target/R600/SIRegisterInfo.cpp:187:1: warning: control reaches end of non-void function [-Wreturn-type]

Add an unreachable label to indicate that this is not possible and still permit
switch coverage checking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213572 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIRegisterInfo.cpp

index 009f24fd63c2c52a8cc96a5f11f43435f6256ae9..2a9a2ac5dd61fd6896ef67e220faef07d1397715 100644 (file)
@@ -184,4 +184,5 @@ unsigned SIRegisterInfo::getPreloadedValue(const MachineFunction &MF,
   case SIRegisterInfo::SCRATCH_PTR:
     return AMDGPU::SGPR2_SGPR3;
   }
+  llvm_unreachable("unexpected preloaded value type");
 }