[llvm] r359383 - [llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 27 09:12:15 PDT 2019
Author: maskray
Date: Sat Apr 27 09:12:14 2019
New Revision: 359383
URL: http://llvm.org/viewvc/llvm-project?rev=359383&view=rev
Log:
[llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests
Modified:
llvm/trunk/test/DebugInfo/X86/xray-split-dwarf-interaction.ll
llvm/trunk/test/DebugInfo/debuglineinfo-path.ll
llvm/trunk/test/LTO/X86/runtime-library.ll
llvm/trunk/test/MC/Mips/tls-symbols.s
llvm/trunk/test/Other/llvm-nm-without-aliases.ll
llvm/trunk/test/ThinLTO/X86/cache-icall.ll
llvm/trunk/test/tools/gold/X86/bcsection.ll
llvm/trunk/test/tools/llvm-ar/coff-weak.yaml
llvm/trunk/test/tools/llvm-nm/X86/IRobj.test
llvm/trunk/test/tools/llvm-nm/X86/dyldinfo.test
llvm/trunk/test/tools/llvm-nm/X86/radix.s
llvm/trunk/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test
llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
llvm/trunk/test/tools/lto/opt-level.ll
llvm/trunk/test/tools/yaml2obj/dynamic-symbols.yaml
llvm/trunk/test/tools/yaml2obj/symbol-index.yaml
llvm/trunk/tools/llvm-nm/llvm-nm.cpp
Modified: llvm/trunk/test/DebugInfo/X86/xray-split-dwarf-interaction.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/xray-split-dwarf-interaction.ll?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/xray-split-dwarf-interaction.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/xray-split-dwarf-interaction.ll Sat Apr 27 09:12:14 2019
@@ -7,7 +7,7 @@
; RUN: -function-sections -data-sections \
; RUN: -relocation-model=pic -filetype=obj \
; RUN: -generate-type-units -o - %s | \
-; RUN: llvm-readelf -sections | \
+; RUN: llvm-readelf --sections | \
; RUN: FileCheck %s --check-prefix=CHECK-ELF
; Created from `clang++ -fxray-instrument -gsplit-dwarf -fdebug-types-section
; -ffunction-sections -fdata-sections -emit-llvm -S input.cc`:
Modified: llvm/trunk/test/DebugInfo/debuglineinfo-path.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/debuglineinfo-path.ll?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/debuglineinfo-path.ll (original)
+++ llvm/trunk/test/DebugInfo/debuglineinfo-path.ll Sat Apr 27 09:12:14 2019
@@ -5,9 +5,9 @@
; It is not essential to DWARF path handling code we're testing here.
; UNSUPPORTED: powerpc
; RUN: %llc_dwarf -O0 -filetype=obj -o %t < %s
-; RUN: llvm-nm -radix=o %t | grep posix_absolute_func > %t.posix_absolute_func
-; RUN: llvm-nm -radix=o %t | grep posix_relative_func > %t.posix_relative_func
-; RUN: llvm-nm -radix=o %t | grep win_func > %t.win_func
+; RUN: llvm-nm --radix=o %t | grep posix_absolute_func > %t.posix_absolute_func
+; RUN: llvm-nm --radix=o %t | grep posix_relative_func > %t.posix_relative_func
+; RUN: llvm-nm --radix=o %t | grep win_func > %t.win_func
; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.posix_absolute_func | FileCheck %s --check-prefix=POSIX_A
; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.posix_relative_func | FileCheck %s --check-prefix=POSIX_R
; RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false --obj %t < %t.win_func | FileCheck %s --check-prefix=WIN
Modified: llvm/trunk/test/LTO/X86/runtime-library.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/LTO/X86/runtime-library.ll?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/LTO/X86/runtime-library.ll (original)
+++ llvm/trunk/test/LTO/X86/runtime-library.ll Sat Apr 27 09:12:14 2019
@@ -1,7 +1,7 @@
; runtime library implementations should be added to llvm.compiler.used
; RUN: llvm-as <%s >%t1
; RUN: llvm-lto -o %t2 %t1
-; RUN: llvm-nm -no-sort %t2 | FileCheck %s -check-prefix=KEEP -check-prefix=LOSE
+; RUN: llvm-nm --no-sort %t2 | FileCheck %s -check-prefix=KEEP -check-prefix=LOSE
target triple = "x86_64-apple-darwin9"
Modified: llvm/trunk/test/MC/Mips/tls-symbols.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/tls-symbols.s?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/MC/Mips/tls-symbols.s (original)
+++ llvm/trunk/test/MC/Mips/tls-symbols.s Sat Apr 27 09:12:14 2019
@@ -1,7 +1,6 @@
# RUN: llvm-mc -arch=mips < %s -position-independent -filetype=obj \
-# RUN: | llvm-readelf -symbols | FileCheck %s
-# RUN: llvm-mc -arch=mips < %s -filetype=obj | llvm-readelf -symbols \
-# RUN: | FileCheck %s
+# RUN: | llvm-readelf -s | FileCheck %s
+# RUN: llvm-mc -arch=mips < %s -filetype=obj | llvm-readelf -s | FileCheck %s
# Test that TLS relocations cause symbols to be marked as TLS symbols.
Modified: llvm/trunk/test/Other/llvm-nm-without-aliases.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/llvm-nm-without-aliases.ll?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/Other/llvm-nm-without-aliases.ll (original)
+++ llvm/trunk/test/Other/llvm-nm-without-aliases.ll Sat Apr 27 09:12:14 2019
@@ -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-as %s -o %t
+; 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
Modified: llvm/trunk/test/ThinLTO/X86/cache-icall.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ThinLTO/X86/cache-icall.ll?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/ThinLTO/X86/cache-icall.ll (original)
+++ llvm/trunk/test/ThinLTO/X86/cache-icall.ll Sat Apr 27 09:12:14 2019
@@ -13,14 +13,14 @@
; RUN: -r=%t.bc,_start,px \
; RUN: -r=%t.bc,f,
-; RUN: llvm-readelf -symbols %t-no.o.* | FileCheck %s --check-prefix=SYMBOLS-NO
+; RUN: llvm-readelf -s %t-no.o.* | FileCheck %s --check-prefix=SYMBOLS-NO
; RUN: llvm-lto2 run -o %t-yes.o %t.bc %t2.bc -cache-dir %t.cache \
; RUN: -r=%t.bc,_start,px \
; RUN: -r=%t.bc,f, \
; RUN: -r=%t2.bc,f,p
-; RUN: llvm-readelf -symbols %t-yes.o.* | FileCheck %s --check-prefix=SYMBOLS-YES
+; RUN: llvm-readelf -s %t-yes.o.* | FileCheck %s --check-prefix=SYMBOLS-YES
; SYMBOLS-NO-DAG: {{FUNC .* f.cfi_jt$}}
; SYMBOLS-NO-DAG: {{NOTYPE .* UND f.cfi_jt$}}
Modified: llvm/trunk/test/tools/gold/X86/bcsection.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/gold/X86/bcsection.ll?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/gold/X86/bcsection.ll (original)
+++ llvm/trunk/test/tools/gold/X86/bcsection.ll Sat Apr 27 09:12:14 2019
@@ -2,11 +2,11 @@
; RUN: llvm-as -o %t/bcsection.bc %s
; RUN: llvm-mc -I=%t -filetype=obj -triple=x86_64-unknown-unknown -o %t/bcsection.bco %p/Inputs/bcsection.s
-; RUN: llvm-nm -no-llvm-bc %t/bcsection.bco 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
+; RUN: llvm-nm --no-llvm-bc %t/bcsection.bco 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
; NO-SYMBOLS: no symbols
; RUN: %gold -r -o %t/bcsection.o -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t/bcsection.bco
-; RUN: llvm-nm -no-llvm-bc %t/bcsection.o | FileCheck %s
+; RUN: llvm-nm --no-llvm-bc %t/bcsection.o | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-unknown"
Modified: llvm/trunk/test/tools/llvm-ar/coff-weak.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-ar/coff-weak.yaml?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-ar/coff-weak.yaml (original)
+++ llvm/trunk/test/tools/llvm-ar/coff-weak.yaml Sat Apr 27 09:12:14 2019
@@ -2,7 +2,7 @@
#
# RUN: rm -f %t.ar
# RUN: llvm-ar crs %t.a %t.obj
-# RUN: llvm-nm -print-armap %t.a | FileCheck %s
+# RUN: llvm-nm --print-armap %t.a | FileCheck %s
# CHECK: Archive map
# CHECK-NEXT: WeakSearchAlias in coff-weak.yaml.tmp.obj
Modified: llvm/trunk/test/tools/llvm-nm/X86/IRobj.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-nm/X86/IRobj.test?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-nm/X86/IRobj.test (original)
+++ llvm/trunk/test/tools/llvm-nm/X86/IRobj.test Sat Apr 27 09:12:14 2019
@@ -1,4 +1,4 @@
-# RUN: llvm-nm -format darwin %p/Inputs/test.IRobj-x86_64 | FileCheck %s
+# RUN: llvm-nm --format darwin %p/Inputs/test.IRobj-x86_64 | FileCheck %s
# CHECK: ---------------- (LTO,RODATA) external _global_const
# CHECK: ---------------- (LTO,DATA) external _global_data
Modified: llvm/trunk/test/tools/llvm-nm/X86/dyldinfo.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-nm/X86/dyldinfo.test?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-nm/X86/dyldinfo.test (original)
+++ llvm/trunk/test/tools/llvm-nm/X86/dyldinfo.test Sat Apr 27 09:12:14 2019
@@ -1,6 +1,6 @@
# RUN: llvm-nm %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DEFAULT %s
-# RUN: llvm-nm -no-dyldinfo %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=NO-DYLDINFO %s
-# RUN: llvm-nm -dyldinfo-only %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DYLDINFO-ONLY %s
+# RUN: llvm-nm --no-dyldinfo %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=NO-DYLDINFO %s
+# RUN: llvm-nm --dyldinfo-only %p/Inputs/Strip-ST.dylib.macho-x86_64 | FileCheck --check-prefix=DYLDINFO-ONLY %s
# RUN: llvm-nm %p/Inputs/Strip-N.hello.exe.macho-x86_64 | FileCheck --check-prefix=FUNC-STARTS %s
# RUN: llvm-nm %p/Inputs/Strip-N.LC_MAIN.exe.macho-x86_64 | FileCheck --check-prefix=LC-MAIN %s
Modified: llvm/trunk/test/tools/llvm-nm/X86/radix.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-nm/X86/radix.s?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-nm/X86/radix.s (original)
+++ llvm/trunk/test/tools/llvm-nm/X86/radix.s Sat Apr 27 09:12:14 2019
@@ -1,8 +1,8 @@
-//#check radix formats of llvm-nm
-//RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t.o
-//RUN: llvm-nm -radix=d %t.o | FileCheck %s
-//RUN: llvm-nm -radix=o %t.o | FileCheck --check-prefix="OCTAL" %s
-//RUN: llvm-nm -t=x %t.o | FileCheck --check-prefix="HEX" %s
+// #check radix formats of llvm-nm
+// RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t.o
+// RUN: llvm-nm --radix=d %t.o | FileCheck %s
+// RUN: llvm-nm --radix=o %t.o | FileCheck --check-prefix=OCTAL %s
+// RUN: llvm-nm -t=x %t.o | FileCheck --check-prefix=HEX %s
.text
.file "1.c"
Modified: llvm/trunk/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/elf-reloc-symbol-with-versioning.test Sat Apr 27 09:12:14 2019
@@ -1,6 +1,6 @@
# RUN: yaml2obj %s > %t.o
-# RUN: llvm-readobj -demangle -r %t.o | FileCheck %s --check-prefix LLVM
-# RUN: llvm-readelf -demangle -r %t.o | FileCheck %s --check-prefix GNU
+# RUN: llvm-readobj --demangle -r %t.o | FileCheck %s --check-prefix LLVM
+# RUN: llvm-readelf --demangle -r %t.o | FileCheck %s --check-prefix GNU
# GNU: Relocation section '.rela.plt' at offset {{.*}} contains 5 entries:
# GNU-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
Modified: llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test Sat Apr 27 09:12:14 2019
@@ -1,7 +1,7 @@
// Test that llvm-readobj dumps version info tags correctly.
-RUN: llvm-readobj -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERDEF
-RUN: llvm-readelf -dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERDEF
+RUN: llvm-readobj --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=LLVM-VERDEF
+RUN: llvm-readelf --dynamic-table -V %p/Inputs/verdef.elf-x86-64 | FileCheck %s --check-prefix=GNU-VERDEF
LLVM-VERDEF: 0x000000006FFFFFF0 VERSYM 0x24C
LLVM-VERDEF: 0x000000006FFFFFFC VERDEF 0x25C
Modified: llvm/trunk/test/tools/lto/opt-level.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/lto/opt-level.ll?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/lto/opt-level.ll (original)
+++ llvm/trunk/test/tools/lto/opt-level.ll Sat Apr 27 09:12:14 2019
@@ -1,8 +1,8 @@
; RUN: llvm-as %s -o %t.o
; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.o
-; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s
+; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s
; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O2 -o %t.dylib %t.o
-; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
+; RUN: llvm-nm --no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
target triple = "x86_64-apple-macosx10.8.0"
Modified: llvm/trunk/test/tools/yaml2obj/dynamic-symbols.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/dynamic-symbols.yaml?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/yaml2obj/dynamic-symbols.yaml (original)
+++ llvm/trunk/test/tools/yaml2obj/dynamic-symbols.yaml Sat Apr 27 09:12:14 2019
@@ -1,7 +1,7 @@
# Ensures that implicitly added sections can be ordered within Sections.
# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj -sections %t | FileCheck %s --check-prefix=SECTION
-# RUN: llvm-nm -dynamic %t | FileCheck %s --check-prefix=SYMBOL
+# RUN: llvm-nm --dynamic %t | FileCheck %s --check-prefix=SYMBOL
!ELF
FileHeader:
Modified: llvm/trunk/test/tools/yaml2obj/symbol-index.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/symbol-index.yaml?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/test/tools/yaml2obj/symbol-index.yaml (original)
+++ llvm/trunk/test/tools/yaml2obj/symbol-index.yaml Sat Apr 27 09:12:14 2019
@@ -1,5 +1,5 @@
# RUN: yaml2obj %s > %t
-# RUN: llvm-readelf -symbols %t | FileCheck %s
+# RUN: llvm-readelf -s %t | FileCheck %s
!ELF
FileHeader:
Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=359383&r1=359382&r2=359383&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Sat Apr 27 09:12:14 2019
@@ -934,10 +934,6 @@ static char getSymbolNMTypeChar(ELFObjec
return '?';
}
- uint8_t Binding = SymI->getOther() >> 4;
- if (Binding == ELF::STB_GNU_UNIQUE)
- return 'u';
-
elf_section_iterator SecI = *SecIOrErr;
if (SecI != Obj.section_end()) {
uint32_t Type = SecI->getType();
More information about the llvm-commits
mailing list