[lld] [lld][WebAssembly] Fix filename when reporting references to undefined symbols (PR #97444)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 2 10:46:56 PDT 2024


================
@@ -1,30 +1,33 @@
-# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %s -o %t1.o
+# RUN: split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %t/main.s -o %t/main.o
+# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %t/secondary.s -o %t/secondary.o
 
-## Check that %t1.o contains undefined symbol undef_func.
-# RUN: not wasm-ld %t1.o -o /dev/null 2>&1 | \
+## Check that %t/main.o contains undefined symbol undef_func.
----------------
sbc100 wrote:

Yes, that is what I want to test here.  Without this change the references in `secondard.o` are reported (incorrectly) as coming from `main.o`.   

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


More information about the llvm-commits mailing list