[lld] 151ab65 - [LLD] [COFF] Add a testcase for the type of autoexported symbols from LTO

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 06:12:15 PST 2023


Author: Martin Storsjö
Date: 2023-01-09T16:11:36+02:00
New Revision: 151ab65c0de7a0a397c7cbe8fab953a755eae2d0

URL: https://github.com/llvm/llvm-project/commit/151ab65c0de7a0a397c7cbe8fab953a755eae2d0
DIFF: https://github.com/llvm/llvm-project/commit/151ab65c0de7a0a397c7cbe8fab953a755eae2d0.diff

LOG: [LLD] [COFF] Add a testcase for the type of autoexported symbols from LTO

This adds test coverage for the behaviour that broke in
7370ff624d217b0f8f7512ca5b651a9b8095a411.

Added: 
    

Modified: 
    lld/test/COFF/export-all-lto.ll

Removed: 
    


################################################################################
diff  --git a/lld/test/COFF/export-all-lto.ll b/lld/test/COFF/export-all-lto.ll
index 13620e11d9b93..8d54b981a104a 100644
--- a/lld/test/COFF/export-all-lto.ll
+++ b/lld/test/COFF/export-all-lto.ll
@@ -2,9 +2,10 @@
 
 ; RUN: llvm-as %s -o %t.bc
 
-; RUN: lld-link -lldmingw -dll -out:%t.dll %t.bc -noentry -output-def:%t.def
+; RUN: lld-link -lldmingw -dll -out:%t.dll %t.bc -noentry -output-def:%t.def -implib:%t.lib
 ; RUN: llvm-readobj --coff-exports %t.dll | grep Name: | FileCheck %s
 ; RUN: cat %t.def | FileCheck --check-prefix=IMPLIB %s
+; RUN: llvm-nm %t.lib | FileCheck --check-prefix=IMPLIB-SYMS %s
 
 ; CHECK: Name: MyComdatFunc
 ; CHECK: Name: MyExtData
@@ -14,6 +15,12 @@
 ; IMPLIB: MyExtData @2 DATA
 ; IMPLIB: MyLibFunc @3{{$}}
 
+; IMPLIB-SYMS: 00000000 T MyComdatFunc
+; IMPLIB-SYMS: 00000000 T __imp_MyComdatFunc
+; IMPLIB-SYMS: 00000000 D __imp_MyExtData
+; IMPLIB-SYMS: 00000000 T MyLibFunc
+; IMPLIB-SYMS: 00000000 T __imp_MyLibFunc
+
 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-w64-windows-gnu"
 


        


More information about the llvm-commits mailing list