1 ## Show that the -j/--just-symbol-name/--format=just-symbols prints only the the
4 # RUN: yaml2obj %s -o %t.o
6 # RUN: llvm-nm -j %t.o > %t.txt
7 # RUN: llvm-nm --just-symbol-name %t.o | diff %t.txt -
8 # RUN: llvm-nm --format=just-symbols %t.o | diff %t.txt -
9 # RUN: llvm-nm --format=sysv -j %t.o | diff %t.txt -
10 # RUN: llvm-nm -j --format=posix %t.o | not diff %t.txt -
12 # RUN: FileCheck %s --input-file=%t.txt --implicit-check-not={{.}} --check-prefix=COMMON
14 # COMMON: {{^}}defined{{$}}
15 # COMMON-NEXT: {{^}}undefined{{$}}
17 # RUN: llvm-nm -j %t.o %t.o | FileCheck %s --check-prefix=MULTI1 -DFILE=%t.o
21 # MULTI1-NEXT: [[FILE]]:
22 # MULTI1-NEXT: defined
23 # MULTI1-NEXT: undefined
25 # MULTI1-NEXT: [[FILE]]:
26 # MULTI1-NEXT: defined
27 # MULTI1-NEXT: undefined
30 # RUN: llvm-nm -j --print-file-name %t.o %t.o | FileCheck %s --check-prefix=MULTI2 -DFILE=%t.o
33 # MULTI2: [[FILE]]: defined
34 # MULTI2-NEXT: [[FILE]]: undefined
35 # MULTI2-NEXT: [[FILE]]: defined
36 # MULTI2-NEXT: [[FILE]]: undefined
47 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]