Change the default input for llvm-nm to be a.out instead of standard input

to match llvm-size and other UNIX systems for their nm(1).

Tweak test cases that used llvm-nm with standard input to add a "-" to
indicate that and add a test case to check the default of a.out for llvm-nm.

llvm-svn: 211529
This commit is contained in:
Kevin Enderby 2014-06-23 20:27:53 +00:00
parent 90186f5931
commit 95dc79eeda
6 changed files with 16 additions and 8 deletions

View File

@ -1,6 +1,6 @@
; RUN: llvm-as <%s >%t1
; RUN: llvm-lto -exported-symbol=_uses_puts -exported-symbol=_uses_printf -o - %t1 | \
; RUN: llvm-nm | \
; RUN: llvm-nm - | \
; RUN: FileCheck %s
; rdar://problem/16165191
; runtime library implementations should not be renamed

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-nm | FileCheck %s
// RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-nm - | FileCheck %s
not_global = 123
global = 456

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-nm | FileCheck %s
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-nm - | FileCheck %s
// test that we don't produce foo.eh symbols in a debug_frame section.
// CHECK-NOT: _f.eh

View File

@ -1,6 +1,6 @@
RUN: yaml2obj %p/Inputs/COFF/i386.yaml | llvm-nm \
RUN: yaml2obj %p/Inputs/COFF/i386.yaml | llvm-nm - \
RUN: | FileCheck %s -check-prefix COFF
RUN: yaml2obj %p/Inputs/COFF/x86-64.yaml | llvm-nm \
RUN: yaml2obj %p/Inputs/COFF/x86-64.yaml | llvm-nm - \
RUN: | FileCheck %s -check-prefix COFF
RUN: llvm-nm %p/Inputs/trivial-object-test.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF
@ -22,6 +22,10 @@ RUN: llvm-nm %p/Inputs/relocatable-with-section-address.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF-SEC-ADDR64
RUN: llvm-nm %p/Inputs/thumb-symbols.elf.arm \
RUN: | FileCheck %s -check-prefix ELF-THUMB
RUN: mkdir -p %t
RUN: cd %t
RUN: cp %p/Inputs/trivial-object-test.macho-i386 a.out
RUN: llvm-nm | FileCheck %s -check-prefix A-OUT
COFF: 00000000 d .data
@ -83,3 +87,7 @@ ELF-SEC-ADDR64-NEXT: 0000000000000060 D p
Test that we drop the thumb bit only from function addresses.
ELF-THUMB: 00000000 t f
ELF-THUMB: 00000003 t g
A-OUT: U _SomeOtherFunction
A-OUT: 00000000 T _main
A-OUT: U _puts

View File

@ -1,6 +1,6 @@
; RUN: llvm-as < %s > %t
; RUN: llvm-nm -without-aliases < %t | FileCheck %s
; RUN: llvm-nm < %t | FileCheck --check-prefix=WITH %s
; RUN: llvm-nm -without-aliases - < %t | FileCheck %s
; RUN: llvm-nm - < %t | FileCheck --check-prefix=WITH %s
; CHECK-NOT: T a0bar
; CHECK-NOT: T a0foo

View File

@ -845,7 +845,7 @@ int main(int argc, char **argv) {
switch (InputFilenames.size()) {
case 0:
InputFilenames.push_back("-");
InputFilenames.push_back("a.out");
case 1:
break;
default: