[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / dllimport-gc.test
blob6253268c2d279310d1bfe60abbb54a4a33994d24
1 # RUN: yaml2obj %p/Inputs/export.yaml -o %t-lib.obj
2 # RUN: lld-link /out:%t.dll /dll %t-lib.obj /implib:%t.lib /export:exportfn1
4 # RUN: yaml2obj %p/Inputs/oldname.yaml -o %t-oldname.obj
6 # RUN: yaml2obj %s -o %t.obj
8 # RUN: lld-link /out:%t1.exe /entry:main %t.obj %t-oldname.obj %t.lib
9 # RUN: llvm-readobj --coff-imports %t1.exe | FileCheck -check-prefix=REF %s
10 # REF-NOT: Symbol: exportfn1
12 # RUN: lld-link /out:%t2.exe /entry:main %t.obj %t-oldname.obj %t.lib /opt:noref
13 # RUN: llvm-readobj --coff-imports %t2.exe | FileCheck -check-prefix=NOREF %s
14 # NOREF: Symbol: exportfn1
16 --- !COFF
17 header:
18   Machine:         IMAGE_FILE_MACHINE_AMD64
19   Characteristics: []
20 sections:
21   - Name:            .text
22     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
23     Alignment:       4
24     SectionData:     0000000000000000
25 symbols:
26   - Name:            .text
27     Value:           0
28     SectionNumber:   1
29     SimpleType:      IMAGE_SYM_TYPE_NULL
30     ComplexType:     IMAGE_SYM_DTYPE_NULL
31     StorageClass:    IMAGE_SYM_CLASS_STATIC
32     SectionDefinition:
33       Length:          8
34       NumberOfRelocations: 0
35       NumberOfLinenumbers: 0
36       CheckSum:        0
37       Number:          0
38   - Name:            main
39     Value:           0
40     SectionNumber:   1
41     SimpleType:      IMAGE_SYM_TYPE_NULL
42     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
43     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
44   - Name:            exportfn1
45     Value:           0
46     SectionNumber:   0
47     SimpleType:      IMAGE_SYM_TYPE_NULL
48     ComplexType:     IMAGE_SYM_DTYPE_NULL
49     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
50   - Name:            exportfn1_alias
51     Value:           0
52     SectionNumber:   0
53     SimpleType:      IMAGE_SYM_TYPE_NULL
54     ComplexType:     IMAGE_SYM_DTYPE_NULL
55     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
56 ...