[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)
Samuel Thibault via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 17 17:41:15 PST 2024
https://github.com/sthibaul updated https://github.com/llvm/llvm-project/pull/78520
>From 15e157e3f7a6beb0b8be36ad1a9dbe3d2079eecf Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault at ens-lyon.org>
Date: Thu, 18 Jan 2024 00:18:03 +0100
Subject: [PATCH] hurd: Fix build with -Werror,-Wswitch
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
---
clang/lib/Driver/ToolChains/Hurd.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/Hurd.cpp b/clang/lib/Driver/ToolChains/Hurd.cpp
index 5074eda5f41559..0bc114b90ffc09 100644
--- a/clang/lib/Driver/ToolChains/Hurd.cpp
+++ b/clang/lib/Driver/ToolChains/Hurd.cpp
@@ -139,6 +139,8 @@ std::string Hurd::getDynamicLinker(const ArgList &Args) const {
return "/lib/ld.so";
case llvm::Triple::x86_64:
return "/lib/ld-x86-64.so.1";
+ default:
+ break;
}
llvm_unreachable("unsupported architecture");
More information about the cfe-commits
mailing list