[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / weak-external-cycle.test
blob65f483350790f74acebe3283b2deed4b31c49e1d
1 REQUIRES: x86
2 RUN: split-file %s %t.dir && cd %t.dir
4 RUN: llvm-mc -filetype=obj -triple=x86_64-windows test.s -o test.obj
5 RUN: llvm-mc -filetype=obj -triple=x86_64-windows sym2.s -o sym2.obj
6 RUN: llvm-mc -filetype=obj -triple=x86_64-windows def.s -o def.obj
8 RUN: not lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj 2>&1 | FileCheck -check-prefix=ERR %s
10 ERR:      error: undefined symbol: testsym
11 ERR-NEXT: >>> referenced by test.obj
12 ERR-EMPTY:
13 ERR-NEXT: error: undefined symbol: sym1
14 ERR-NEXT: >>> referenced by test.obj
15 ERR-NEXT: >>> referenced by sym2.obj
16 ERR-EMPTY:
17 ERR-NEXT: error: undefined symbol: sym2
18 ERR-NEXT: >>> referenced by test.obj
19 ERR-NEXT: >>> referenced by sym2.obj
21 Depending on symbol processing order, we may have temporary weak reference cycles:
23 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj def.obj
24 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj def.obj sym2.obj
25 RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll def.obj test.obj sym2.obj
27 #--- test.s
28     .weak testsym
29 .set testsym, sym1
30     .weak sym1
31 .set sym1, sym2
33 #--- sym2.s
34     .weak sym2
35 .set sym2, sym1
37 #--- def.s
38     .globl sym1
39     .data
40 sym1:
41     .word 0