3 ; RUN: llvm-as %s -o %t.bc
5 ; RUN: lld-link -lldmingw -dll -out:%t.dll %t.bc -noentry -output-def:%t.def -implib:%t.lib
6 ; RUN: llvm-readobj --coff-exports %t.dll | grep Name: | FileCheck %s
7 ; RUN: cat %t.def | FileCheck --check-prefix=IMPLIB %s
8 ; RUN: llvm-nm %t.lib | FileCheck --check-prefix=IMPLIB-SYMS %s
10 ; CHECK: Name: MyComdatFunc
11 ; CHECK: Name: MyExtData
12 ; CHECK: Name: MyLibFunc
14 ; IMPLIB: MyComdatFunc @1{{$}}
15 ; IMPLIB: MyExtData @2 DATA
16 ; IMPLIB: MyLibFunc @3{{$}}
18 ; IMPLIB-SYMS: 00000000 T MyComdatFunc
19 ; IMPLIB-SYMS: 00000000 T __imp_MyComdatFunc
20 ; IMPLIB-SYMS: 00000000 D __imp_MyExtData
21 ; IMPLIB-SYMS: 00000000 T MyLibFunc
22 ; IMPLIB-SYMS: 00000000 T __imp_MyLibFunc
24 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
25 target triple = "x86_64-w64-windows-gnu"
27 @MyExtData = dso_local global i32 42, align 4
29 $MyComdatFunc = comdat any
31 define dso_local void @MyLibFunc() {
33 call void @MyComdatFunc()
37 define linkonce_odr void @MyComdatFunc() comdat {