1RUN: llvm-nm %p/Inputs/archive-test.a-coff-i386 \ 2RUN: | FileCheck %s -check-prefix COFF 3 4COFF: trivial-object-test.coff-i386: 5COFF-NEXT: 00000000 d .data 6COFF-NEXT: 00000000 t .text 7COFF-NEXT: 00000000 d L_.str 8COFF-NEXT: U _SomeOtherFunction 9COFF-NEXT: 00000000 T _main 10COFF-NEXT: U _puts 11 12 13RUN: llvm-as %p/Inputs/trivial.ll -o=%t1 14RUN: rm -f %t2 15RUN: llvm-ar rcs %t2 %t1 16RUN: llvm-nm %t2 | FileCheck %s -check-prefix BITCODE 17 18BITCODE: U SomeOtherFunction 19BITCODE-NEXT: T main 20BITCODE-NEXT: U puts 21BITCODE-NEXT: D var 22 23 24Test we don't error with an archive with no symtab. 25RUN: llvm-nm %p/Inputs/archive-test.a-gnu-no-symtab 26 27 28Or in an archive with no symtab or string table. 29RUN: llvm-nm %p/Inputs/archive-test.a-gnu-minimal 30 31 32And don't crash when asked to print a non-existing symtab. 33RUN: llvm-nm -M %p/Inputs/archive-test.a-gnu-minimal 34 35Don't reject an empty archive. 36RUN: llvm-nm %p/Inputs/archive-test.a-empty 37 38This archive has an unaligned member and a unknown format member. 39GNU AR is able to parse the unaligned member and warns about the member with 40the unknown format. We should probably simply warn on both. For now just check 41that we don't produce an error. 42RUN: llvm-nm %p/Inputs/corrupt-archive.a 43