[AMDGPU] Fix "use of uninitialized variable" static analyzer warning. NFCI.

Add "unreachable" default case to AMDGPUTargetStreamer::getArchNameFromElfMach
This commit is contained in:
Simon Pilgrim 2020-01-06 16:36:33 +00:00
parent 5bcc747393
commit ea2c159f96
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ StringRef AMDGPUTargetStreamer::getArchNameFromElfMach(unsigned ElfMach) {
AMDGPU::GPUKind AK;
switch (ElfMach) {
default: llvm_unreachable("Unhandled ELF::EF_AMDGPU type");
case ELF::EF_AMDGPU_MACH_R600_R600: AK = GK_R600; break;
case ELF::EF_AMDGPU_MACH_R600_R630: AK = GK_R630; break;
case ELF::EF_AMDGPU_MACH_R600_RS880: AK = GK_RS880; break;