Author: Manuel Carrasco
Date: 2026-05-06T13:43:00-03:00
New Revision: 0e6d57648584c3895abd3021fb8fa2a767146d5a

URL: 
https://github.com/llvm/llvm-project/commit/0e6d57648584c3895abd3021fb8fa2a767146d5a
DIFF: 
https://github.com/llvm/llvm-project/commit/0e6d57648584c3895abd3021fb8fa2a767146d5a.diff

LOG: Revert "[Driver][HIP/SPIRV] Fix crash when llvm-link is executed" (#196113)

This reverts commit 6887ccf6251dcdf835e3df2bf93ad04133c5ad78. 

Reason: Failure in post merge buildbot
https://github.com/llvm/llvm-project/pull/196074#issuecomment-4390083234

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/HIPAMD.cpp

Removed: 
    clang/test/Driver/hip-spirv-linker-crash.c


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/HIPAMD.cpp 
b/clang/lib/Driver/ToolChains/HIPAMD.cpp
index e086e15a8c380..b4ff90c1d61f0 100644
--- a/clang/lib/Driver/ToolChains/HIPAMD.cpp
+++ b/clang/lib/Driver/ToolChains/HIPAMD.cpp
@@ -40,8 +40,7 @@ void AMDGCN::Linker::constructLLVMLinkCommand(
   ArgStringList LinkerInputs;
 
   for (auto Input : Inputs)
-    if (Input.isFilename())
-      LinkerInputs.push_back(Input.getFilename());
+    LinkerInputs.push_back(Input.getFilename());
 
   // Look for archive of bundled bitcode in arguments, and add temporary files
   // for the extracted archive of bitcode to inputs.

diff  --git a/clang/test/Driver/hip-spirv-linker-crash.c 
b/clang/test/Driver/hip-spirv-linker-crash.c
deleted file mode 100644
index 3f8835f2b5696..0000000000000
--- a/clang/test/Driver/hip-spirv-linker-crash.c
+++ /dev/null
@@ -1,15 +0,0 @@
-// Verify that SPIR-V compilation does not crash during the llvm-link step
-// due to extra args that are not meant to be forwarded there.
-//
-// RUN: %clang -### --target=spirv64-amd-amdhsa -use-spirv-backend \
-// RUN:   -Xlinker -opt-bisect-limit=-1 %s 2>&1 \
-// RUN:   | FileCheck %s
-//
-// RUN: %clang -### --target=spirv64-amd-amdhsa -use-spirv-backend \
-// RUN:   -Xlinker -mllvm -Xlinker -opt-bisect-limit=-1 %s 2>&1 \
-// RUN:   | FileCheck %s
-//
-// CHECK: "{{.*}}llvm-link"
-// CHECK-NOT: opt-bisect-limit
-// CHECK-NOT: -mllvm
-// CHECK-SAME: "-o" "{{.*}}.bc" "{{.*}}.bc"{{$}}


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to