[clang] [Driver][Hurd] Remove llvm_unreachable (PR #171077)

Brad Smith via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 7 20:47:32 PST 2025


https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/171077

Remove the llvm_unreachable from getDynamicLinker(). The code path is
reachable. In the case of an unsupported architecture we're not worrying
about trying to actually determine the dynamic linker, and I don't think
it makes sense for the Driver to crash.

Pointed out by bug report #64194

>From 83903444f5ee383ba3ad13ad9152737e8810cff6 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Sun, 7 Dec 2025 23:34:11 -0500
Subject: [PATCH] [Driver][Hurd] Remove llvm_unreachable

Remove the llvm_unreachable from getDynamicLinker(). The code path is
reachable. In the case of an unsupported architecture we're not worrying
about trying to actually determine the dynamic linker, and I don't think
it makes sense for the Driver to crash.

Pointed out by bug report #64194
---
 clang/lib/Driver/ToolChains/Hurd.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/Driver/ToolChains/Hurd.cpp b/clang/lib/Driver/ToolChains/Hurd.cpp
index 53ee4d4c0cbde..b2c887fb72671 100644
--- a/clang/lib/Driver/ToolChains/Hurd.cpp
+++ b/clang/lib/Driver/ToolChains/Hurd.cpp
@@ -160,7 +160,7 @@ std::string Hurd::getDynamicLinker(const ArgList &Args) const {
     break;
   }
 
-  llvm_unreachable("unsupported architecture");
+  return "";
 }
 
 void Hurd::AddClangSystemIncludeArgs(const ArgList &DriverArgs,



More information about the cfe-commits mailing list