Skip to content

Commit 17bc449

Browse files
committed
[ELF] Improve thin-archivecollision.ll
1 parent 3c20e25 commit 17bc449

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

lld/test/ELF/lto/thin-archivecollision.ll

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
; REQUIRES: x86
2-
; RUN: opt -module-summary %s -o %t.o
2+
; RUN: rm -rf %t && mkdir %t && cd %t
3+
; RUN: mkdir d e
4+
; RUN: opt -module-summary %s -o b.bc
35
; RUN: mkdir -p %t1 %t2
4-
; RUN: opt -module-summary %p/Inputs/thin1.ll -o %t1/t.coll.o
5-
; RUN: opt -module-summary %p/Inputs/thin2.ll -o %t2/t.coll.o
6+
; RUN: opt -module-summary %p/Inputs/thin1.ll -o d/coll.o
7+
; RUN: opt -module-summary %p/Inputs/thin2.ll -o e/coll.o
68

7-
; RUN: rm -f %t.a
8-
; RUN: llvm-ar rcs %t.a %t1/t.coll.o %t2/t.coll.o
9-
; RUN: ld.lld %t.o %t.a -o %t
10-
; RUN: llvm-nm %t | FileCheck %s
11-
12-
; Check without a archive symbol table
13-
; RUN: rm -f %t.a
14-
; RUN: llvm-ar rcS %t.a %t1/t.coll.o %t2/t.coll.o
15-
; RUN: ld.lld %t.o %t.a -o %t
16-
; RUN: llvm-nm %t | FileCheck %s
9+
; RUN: llvm-ar rcS d/a.a d/coll.o e/coll.o
10+
; RUN: ld.lld b.bc d/a.a -o out --save-temps
11+
; RUN: llvm-nm out | FileCheck %s
12+
; RUN: llvm-nm out2.lto.o | FileCheck %s --check-prefix=MOD2
13+
; RUN: llvm-nm out3.lto.o | FileCheck %s --check-prefix=MOD3
1714

1815
; Check we handle this case correctly even in presence of --whole-archive.
19-
; RUN: ld.lld %t.o --whole-archive %t.a -o %t
20-
; RUN: llvm-nm %t | FileCheck %s
16+
; RUN: rm out1.lto.o out2.lto.o out3.lto.o
17+
; RUN: ld.lld b.bc --whole-archive d/a.a -o out --save-temps
18+
; RUN: llvm-nm out | FileCheck %s
19+
; RUN: ls out1.lto.o out2.lto.o out3.lto.o
2120

2221
; CHECK: T _start
2322
; CHECK: T blah
2423
; CHECK: T foo
2524

25+
; MOD2: T foo
26+
; MOD3: T blah
27+
2628
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2729
target triple = "x86_64-scei-ps4"
2830

0 commit comments

Comments
 (0)