summaryrefslogtreecommitdiff
path: root/lld/test
diff options
context:
space:
mode:
authorAlvin Wong <alvin@alvinhc.com>2023-04-23 23:52:55 +0800
committerAlvin Wong <alvin@alvinhc.com>2023-04-24 22:06:34 +0800
commit9b15e9840f5073aa38939fbef1cb0c64dcc5f02f (patch)
tree718f52ced34db887ffd11e26625384ed0756242d /lld/test
parent271a73dae32f5eac2011a2f85351975484496262 (diff)
downloadllvm-9b15e9840f5073aa38939fbef1cb0c64dcc5f02f.tar.gz
[LLD][COFF] Print object file name for unsupported directives
This is a small QoL improvement suggested by FrancescElies in https://github.com/llvm/llvm-project/issues/56300#issuecomment-1172104966. Differential Revision: https://reviews.llvm.org/D149022
Diffstat (limited to 'lld/test')
-rw-r--r--lld/test/COFF/directives-unsupported.s15
1 files changed, 15 insertions, 0 deletions
diff --git a/lld/test/COFF/directives-unsupported.s b/lld/test/COFF/directives-unsupported.s
new file mode 100644
index 000000000000..1b8231178df8
--- /dev/null
+++ b/lld/test/COFF/directives-unsupported.s
@@ -0,0 +1,15 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-windows %s -filetype=obj -o %t.obj
+
+# RUN: not lld-link -dll -out:%t.dll -entry:entry %t.obj -subsystem:console 2>&1 | FileCheck %s
+
+# CHECK: warning: ignoring unknown argument: -unknowndirectivename
+# CHECK: error: -unknowndirectivename is not allowed in .drectve ({{.*}}.obj)
+
+ .global entry
+ .text
+entry:
+ ret
+ .section .drectve
+ .ascii " -unknowndirectivename "