Skip to content

Commit 2d756d9

Browse files
committed
[lld-macho,test] Adjust reproduce-thin-archive-objc.s
When `cd %t` is used, it's conventional to move it above and omit `-o /dev/null`. We don't check the string before `warning:` since (a) the string is not very useful and (b) downstream might customize `ctx->e.logName` (argv[0]). count 0 is better than `--allow-empty`. In addition, without `2>&1` the previous test was effective.
1 parent d4dc8e4 commit 2d756d9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lld/test/MachO/reproduce-thin-archive-objc.s

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
44
## during linking. However, we need to iterate over all members for -ObjC, check that we don't
55
## crash when we encounter a missing member.
66

7-
# RUN: rm -rf %t; mkdir %t
8-
# RUN: sed s/SYM/_main/ %s | llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/main.o
9-
# RUN: sed s/SYM/_unused/ %s | llvm-mc -filetype=obj -triple=x86_64-apple-macos -o %t/unused.o
7+
# RUN: rm -rf %t && mkdir %t && cd %t
8+
# RUN: sed s/SYM/_main/ %s | llvm-mc -filetype=obj -triple=x86_64-apple-macos -o main.o
9+
# RUN: sed s/SYM/_unused/ %s | llvm-mc -filetype=obj -triple=x86_64-apple-macos -o unused.o
1010

11-
# RUN: cd %t; llvm-ar rcsT unused.a unused.o; rm unused.o
11+
# RUN: llvm-ar rcsT unused.a unused.o; rm unused.o
1212
## FIXME: Absolute paths don't end up relativized in the repro file.
1313

1414
# RUN: %no-fatal-warnings-lld %t/main.o %t/unused.a -ObjC -o /dev/null 2>&1 \
1515
# RUN: | FileCheck %s --check-prefix=WARN
1616

17-
# RUN: %lld %t/main.o %t/unused.a -ObjC --no-warn-thin-archive-missing-members -o /dev/null \
18-
# RUN: | FileCheck %s --implicit-check-not 'warning' --allow-empty
17+
# RUN: %lld main.o unused.a -ObjC --no-warn-thin-archive-missing-members 2>&1 | count 0
1918

20-
# WARN: ld64.lld: warning: {{.*}}unused.a: -ObjC failed to open archive member: 'unused.o'
19+
# WARN: warning: {{.*}}unused.a: -ObjC failed to open archive member: 'unused.o'
2120

2221
.text
2322
.globl SYM

0 commit comments

Comments
 (0)