Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-nm / defined-only.test
blobe36297a53e023aedabfd5699ddabf4143637da27
1 ## Show that the --defined-only option omits undefined symbols.
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: llvm-nm %t.o --defined-only > %t.defonly.txt
5 # RUN: llvm-nm %t.o -U > %t.U.txt
7 # RUN: cmp %t.defonly.txt %t.U.txt
9 # RUN: FileCheck %s --input-file=%t.defonly.txt --implicit-check-not={{.}}
11 # CHECK: 0000000000000000 T defined
13 --- !ELF
14 FileHeader:
15   Class:   ELFCLASS64
16   Data:    ELFDATA2LSB
17   Type:    ET_REL
18 Sections:
19   - Name:  .text
20     Type:  SHT_PROGBITS
21     Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
22 Symbols:
23   - Name:    defined
24     Section: .text
25     Binding: STB_GLOBAL
26   - Name:    undefined
27     Binding: STB_GLOBAL