Skip to content

Conversation

@tobias-stadler
Copy link
Contributor

Created using spr 1.3.6-wip
@llvmbot
Copy link
Member

llvmbot commented Aug 15, 2024

@llvm/pr-subscribers-llvm-globalisel

Author: Tobias Stadler (tobias-stadler)

Changes

Default case in covered switches is illegal.
https://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations


Full diff: https://github.com/llvm/llvm-project/pull/104441.diff

1 Files Affected:

  • (modified) llvm/lib/CodeGen/GlobalISel/Combiner.cpp (+1-2)
diff --git a/llvm/lib/CodeGen/GlobalISel/Combiner.cpp b/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
index 75b2525e368af6..c5ec73cd5c65d8 100644
--- a/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/Combiner.cpp
@@ -217,9 +217,8 @@ Combiner::WorkListMaintainer::create(Level Lvl, WorkListTy &WorkList,
   case Level::SinglePass:
     return std::make_unique<WorkListMaintainerImpl<Level::SinglePass>>(WorkList,
                                                                        MRI);
-  default:
-    llvm_unreachable("Illegal ObserverLevel");
   }
+  llvm_unreachable("Illegal ObserverLevel");
 }
 
 Combiner::Combiner(MachineFunction &MF, CombinerInfo &CInfo,

@tobias-stadler tobias-stadler merged commit 13a6a79 into main Aug 15, 2024
@tobias-stadler tobias-stadler deleted the users/tobias-stadler/spr/globalisel-combiner-fix-warning-after-102163 branch August 15, 2024 14:27
steven-studio pushed a commit to steven-studio/llvm-project that referenced this pull request Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants