Skip to content

Conversation

@brad0
Copy link
Contributor

@brad0 brad0 commented Dec 8, 2025

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

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 llvm#64194
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Dec 8, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 8, 2025

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Brad Smith (brad0)

Changes

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


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

1 Files Affected:

  • (modified) clang/lib/Driver/ToolChains/Hurd.cpp (+1-1)
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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants