Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / undefined-symbol-itanium.s
blob8641db927b29f3793877aef8ec0f9ddbad7c7766
1 # REQUIRES: x86
2 # RUN: llvm-mc -triple=x86_64-windows-gnu -filetype=obj -o %t.o %s
3 # RUN: not lld-link /lldmingw /out:%t.exe %t.o 2>&1 | FileCheck %s
4 # RUN: not lld-link /lldmingw /out:%t.exe /demangle %t.o 2>&1 | FileCheck %s
5 # RUN: not lld-link /lldmingw /out:%t.exe /demangle:no %t.o 2>&1 | FileCheck --check-prefix=NODEMANGLE %s
7 # NODEMANGLE: error: undefined symbol: _Z3fooi
8 # NODEMANGLE: error: undefined symbol: _Z3barPKc
9 # NODEMANGLE: error: undefined symbol: __imp__Z3bazv
11 # CHECK: error: undefined symbol: foo(int)
12 # CHECK-NEXT: >>> referenced by {{.*}}.o:(main)
13 # CHECK-NEXT: >>> referenced by {{.*}}.o:(main)
14 # CHECK-EMPTY:
15 # CHECK-NEXT: error: undefined symbol: bar(char const*)
16 # CHECK-NEXT: >>> referenced by {{.*}}.o:(main)
17 # CHECK-NEXT: >>> referenced by {{.*}}.o:(f1)
18 # CHECK-EMPTY:
19 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) baz()
20 # CHECK-NEXT: >>> referenced by {{.*}}.o:(f2)
22 .section .text,"xr",one_only,main
23 .globl main
24 main:
25 call _Z3fooi
26 call _Z3fooi
27 call _Z3barPKc
29 f1:
30 call _Z3barPKc
31 .Lfunc_end1:
33 .section .text,"xr",one_only,f2
34 .globl f2
35 f2:
36 callq *__imp__Z3bazv(%rip)