summaryrefslogtreecommitdiffstats
path: root/llvm/test/DebugInfo/llvm-symbolizer.test
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2019-01-23 17:27:48 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2019-01-23 17:27:48 +0000
commit25ce596cd111ba93777338412ff9731b16f45cc6 (patch)
tree29574ce3db13dfe4bda309b9a28bf2c249e6c42f /llvm/test/DebugInfo/llvm-symbolizer.test
parent15a77418a9cbf24efb1f6a6a2d5c776e31d5c2d2 (diff)
downloadbcm5719-llvm-25ce596cd111ba93777338412ff9731b16f45cc6.tar.gz
bcm5719-llvm-25ce596cd111ba93777338412ff9731b16f45cc6.zip
[llvm-symbolizer] Improve compatibility of --functions with GNU addr2line
This fixes https://bugs.llvm.org/show_bug.cgi?id=40072. GNU addr2line's --functions switch is off by default, has a short alias of -f, and does not take an argument. This patch changes llvm-symbolizer to allow the second and third point (changing the default behaviour may have negative impacts on users). If the option is missing a value, it now treats it as "linkage". This change does cause one previously valid command-line to behave differently. Before --functions <value> was accepted, but now only --functions=<value> is allowed (as well as --functions). The old behaviour will result in the value being treated as a positional argument. The previous testing for --functions=short has been pulled out into a new test that also tests the other accepted values and option formats. Reviewed by: ruiu Differential Revision: https://reviews.llvm.org/D57049 llvm-svn: 351968
Diffstat (limited to 'llvm/test/DebugInfo/llvm-symbolizer.test')
-rw-r--r--llvm/test/DebugInfo/llvm-symbolizer.test15
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/test/DebugInfo/llvm-symbolizer.test b/llvm/test/DebugInfo/llvm-symbolizer.test
index 81b69ba0f4c..33d83c45cf5 100644
--- a/llvm/test/DebugInfo/llvm-symbolizer.test
+++ b/llvm/test/DebugInfo/llvm-symbolizer.test
@@ -207,23 +207,22 @@ RUN: | FileCheck %s --check-prefix=STRIPPED
STRIPPED: global_func
-RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
-RUN: llvm-symbolizer --functions=short --demangle=false < %t.input7 \
-RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
-RUN: llvm-symbolizer --functions=short -C=false < %t.input7 \
-RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
-
-SHORT_FUNCTION_NAME-NOT: _Z1cv
-
; Check that the last of --demangle and --no-demangle wins.
+RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
RUN: llvm-symbolizer --demangle < %t.input7 \
RUN: | FileCheck %s --check-prefix=DEMANGLED_FUNCTION_NAME
+RUN: llvm-symbolizer -C < %t.input7 \
+RUN: | FileCheck %s --check-prefix=DEMANGLED_FUNCTION_NAME
RUN: llvm-symbolizer --no-demangle < %t.input7 \
RUN: | FileCheck %s --check-prefix=MANGLED_FUNCTION_NAME
RUN: llvm-symbolizer --demangle --no-demangle < %t.input7 \
RUN: | FileCheck %s --check-prefix=MANGLED_FUNCTION_NAME
+RUN: llvm-symbolizer -C --no-demangle < %t.input7 \
+RUN: | FileCheck %s --check-prefix=MANGLED_FUNCTION_NAME
RUN: llvm-symbolizer --no-demangle --demangle < %t.input7 \
RUN: | FileCheck %s --check-prefix=DEMANGLED_FUNCTION_NAME
+RUN: llvm-symbolizer --no-demangle -C < %t.input7 \
+RUN: | FileCheck %s --check-prefix=DEMANGLED_FUNCTION_NAME
MANGLED_FUNCTION_NAME: _Z1cv
DEMANGLED_FUNCTION_NAME: c()
OpenPOWER on IntegriCloud