[lld] [LLD][COFF] Handle imported weak aliases consistently (PR #109105)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 18 02:13:46 PDT 2024


================
@@ -0,0 +1,25 @@
+# REQUIRES: x86
+
+# RUN: split-file %s %t.dir
+# RUN: llc --filetype=obj -o %t.foo.obj %t.dir/foo.ll
+# RUN: llvm-mc --filetype=obj -triple=x86_64-windows-msvc %t.dir/qux.s -o %t.qux.obj
+# RUN: lld-link %t.qux.obj %t.foo.obj -out:%t.dll -dll 2>&1 | FileCheck %s
+#
+# CHECK-NOT: lld-link: error: undefined symbol: __declspec(dllimport) foo
----------------
mstorsjo wrote:

This seems a bit overly specific for a negative test... On the other hand, if we'd get this error, the `lld-link` invocation itself would fail too, which would be enough to trigger a failed test.

Not sure if we strictly need a `FileCheck` invocation at all, if all we need to check is that we don't hit an error.

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


More information about the llvm-commits mailing list