Skip to content

[GlobalISel] Combiner: Fix warning after #102163 #104441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
7 of 9 checks passed
@tobias-stadler tobias-stadler deleted the users/tobias-stadler/spr/globalisel-combiner-fix-warning-after-102163 branch August 15, 2024 14:27
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.

3 participants