1 ## Test the deletion of members and that symbols are removed from the symbol table.
3 # RUN: yaml2obj %s -o %t-delete.o --docnum=1
4 # RUN: yaml2obj %s -o %t-keep.o --docnum=2
10 # RUN: llvm-ar rc %t.a %t1.txt %t-delete.o %t-keep.o %t2.txt
11 # RUN: llvm-nm --print-armap %t.a \
12 # RUN: | FileCheck %s --check-prefix=SYMBOL-ADDED
13 # RUN: llvm-ar t %t.a | FileCheck %s --check-prefix=FILE-ADDED
15 # SYMBOL-ADDED: symbol1
16 # SYMBOL-ADDED-NEXT: symbol2
19 # FILE-ADDED-NEXT: delete.o
20 # FILE-ADDED-NEXT: keep.o
21 # FILE-ADDED-NEXT: 2.txt
23 ## Delete file that is not a member:
24 # RUN: cp %t.a %t-archive-copy.a
25 # RUN: llvm-ar d %t.a t/missing.o
26 # RUN: cmp %t.a %t-archive-copy.a
29 # RUN: llvm-ar d %t.a %t-delete.o
30 # RUN: llvm-nm --print-armap %t.a \
31 # RUN: | FileCheck %s --check-prefix=SYMBOL-DELETED --implicit-check-not symbol1
32 # RUN: llvm-ar t %t.a \
33 # RUN: | FileCheck %s --check-prefix=FILE-DELETED --implicit-check-not delete.o
35 # SYMBOL-DELETED: symbol2
38 # FILE-DELETED-NEXT: keep.o
39 # FILE-DELETED-NEXT: 2.txt