2 # RUN: split-file %s %t
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %t/dllmain.s -o %t/dllmain.obj
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-windows-msvc %t/path.s -o %t/path.obj
5 # RUN: lld-link -lib %t/dllmain.obj -out:%t/archive.lib
6 # RUN: echo -e "LIBRARY foo\nEXPORTS\n GetPathOnDisk" > %t.def
7 # RUN: lld-link -entry:dllmain -dll -def:%t.def %t/path.obj %t/archive.lib -out:%t/foo.dll -implib:%t/foo.lib
8 # RUN: llvm-readobj %t/foo.lib | FileCheck -check-prefix IMPLIB %s
9 # RUN: llvm-readobj --coff-exports %t/foo.dll | FileCheck -check-prefix EXPORTS %s
11 # IMPLIB: File: foo.dll
12 # IMPLIB: Name type: undecorate
13 # IMPLIB-NEXT: Symbol: __imp_?GetPathOnDisk@@YA_NPEA_W@Z
14 # IMPLIB-NEXT: Symbol: ?GetPathOnDisk@@YA_NPEA_W@Z
16 # EXPORTS: Name: GetPathOnDisk
20 .def "?GetPathOnDisk@@YA_NPEA_W@Z";
24 .globl "?GetPathOnDisk@@YA_NPEA_W@Z"
25 "?GetPathOnDisk@@YA_NPEA_W@Z":