================
@@ -59,7 +59,11 @@ void HIPSPV::Linker::constructLinkAndEmitSpirvCommand(
// Link LLVM bitcode.
ArgStringList LinkArgs{};
- for (auto Input : Inputs)
+ // The new offload driver can pass non-filename InputInfo entries (e.g.
+ // Nothing/InputArg placeholders) alongside the real bitcode inputs. Calling
+ // getFilename() on those reads garbage from the union; only forward genuine
+ // filename inputs to llvm-link.
+ for (const auto &Input : Inputs)
if (Input.isFilename())
LinkArgs.push_back(Input.getFilename());
----------------
linehill wrote:
This change got introduced in https://github.com/llvm/llvm-project/pull/187655
so a rebase maybe needed before merge.
https://github.com/llvm/llvm-project/pull/186972
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits