-
Notifications
You must be signed in to change notification settings - Fork 13.5k
hurd: Fix build with -Werror,-Wswitch #78520
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
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Samuel Thibault (sthibaul) ChangesWe do not handle all architectures, llvm_unreachable is called after the switch, so we can just break. Fixes https://lab.llvm.org/buildbot/#/builders/19/builds/23702 Full diff: https://github.com/llvm/llvm-project/pull/78520.diff 1 Files Affected:
diff --git a/clang/lib/Driver/ToolChains/Hurd.cpp b/clang/lib/Driver/ToolChains/Hurd.cpp
index 5074eda5f41559..36499fb11ad88f 100644
--- a/clang/lib/Driver/ToolChains/Hurd.cpp
+++ b/clang/lib/Driver/ToolChains/Hurd.cpp
@@ -135,6 +135,8 @@ Tool *Hurd::buildAssembler() const {
std::string Hurd::getDynamicLinker(const ArgList &Args) const {
switch (getArch()) {
+ default:
+ break;
case llvm::Triple::x86:
return "/lib/ld.so";
case llvm::Triple::x86_64:
|
Drive-by: is the
|
Hurd triplets are only defined for x86 and x86_64. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason you put this first? Otherwise IMO it is slightly neater to put it last.
We do not handle all architectures, llvm_unreachable is called after the switch, so we can just break. Fixes https://lab.llvm.org/buildbot/#/builders/19/builds/23702
No particular reason.
Done so. |
This bug had been fixed here:
Thanks. |
We do not handle all architectures, llvm_unreachable is called after the switch, so we can just break.
Fixes https://lab.llvm.org/buildbot/#/builders/19/builds/23702