[llvm] e0c8265 - Revert "Fix "enumerator 'llvm::TargetStackID::WasmLocal' in switch of enum 'llvm::TargetStackID::Value' is not handled" MSVC warnings. NFCI."

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 08:55:50 PDT 2021


Author: Nemanja Ivanovic
Date: 2021-05-28T10:53:49-05:00
New Revision: e0c826543706527ff1ec978ac8817fafcbcbbeaa

URL: https://github.com/llvm/llvm-project/commit/e0c826543706527ff1ec978ac8817fafcbcbbeaa
DIFF: https://github.com/llvm/llvm-project/commit/e0c826543706527ff1ec978ac8817fafcbcbbeaa.diff

LOG: Revert "Fix "enumerator 'llvm::TargetStackID::WasmLocal' in switch of enum 'llvm::TargetStackID::Value' is not handled" MSVC warnings. NFCI."

Since ca5f07f8c4bc96d16ed1992b810aa3897df157f2 already reverted
the cause for this warning, this commit now causes warnings about
a default label in a switch that covers the enum.

This reverts commit cf2eeb114c59cfc3a80133e96c585188fa16cc98.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
    llvm/lib/Target/RISCV/RISCVFrameLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
index 3a0e4a298caa6..963f58f4c72f1 100644
--- a/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -662,8 +662,6 @@ bool SIFrameLowering::isSupportedStackID(TargetStackID::Value ID) const {
     return true;
   case TargetStackID::ScalableVector:
     return false;
-  default:
-    break;
   }
   llvm_unreachable("Invalid TargetStackID::Value");
 }

diff  --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
index 16008df7de332..2417daf5fb4e1 100644
--- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -1100,8 +1100,6 @@ bool RISCVFrameLowering::isSupportedStackID(TargetStackID::Value ID) const {
   case TargetStackID::NoAlloc:
   case TargetStackID::SGPRSpill:
     return false;
-  default:
-    break;
   }
   llvm_unreachable("Invalid TargetStackID::Value");
 }


        


More information about the llvm-commits mailing list