3 ## For a long time, LLD only included those members from thin archives that were actually used
4 ## during linking. However, we need to iterate over all members for -ObjC, check that we don't
5 ## crash when we encounter a missing member.
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
11 # RUN: llvm-ar rcsT unused.a unused.o; rm unused.o
12 ## FIXME: Absolute paths don't end up relativized in the repro file.
14 # RUN: %no-fatal-warnings-lld %t/main.o %t/unused.a -ObjC -o /dev/null 2>&1 \
15 # RUN: | FileCheck %s --check-prefix=WARN
17 # RUN: %lld main.o unused.a -ObjC --no-warn-thin-archive-missing-members 2>&1 | count 0
19 # WARN: warning: {{.*}}unused.a: -ObjC failed to open archive member: 'unused.o'