[clang] [HIP] Check if Input is a file before constructing link job (PR #183492)

Dmitry Sidorov via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 26 07:27:11 PST 2026


================
@@ -39,8 +39,11 @@ void AMDGCN::Linker::constructLLVMLinkCommand(
 
   ArgStringList LinkerInputs;
 
-  for (auto Input : Inputs)
+  for (auto Input : Inputs) {
+    if (!Input.isFilename())
----------------
MrSidims wrote:

> Is the problem that we are treating non-filename linker inputs (like linker flags?) like filenames and that's blowing up? Giving an example of the problem in the PR description might be useful

It's just options appearing to the linker. I agree, that https://github.com/llvm/llvm-project/pull/183529/changes is a more correct fix for the found issue. But in general, I also don't think, that we should abandon this very PR as such sanity checks exist also for constructLldCommand.

https://github.com/llvm/llvm-project/pull/183492


More information about the cfe-commits mailing list