[llvm] [llvm-symbolizer] restore --[no-]use-symbol-table option (PR #71008)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 00:09:50 PST 2023


================
@@ -1,15 +1,26 @@
 # REQUIRES: x86-registered-target
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
-# RUN: llvm-addr2line --no-use-symbol-table -fe %t.o 0x1 | FileCheck %s
-# CHECK: foo
-# CHECK: relocatable.c
-# The above addr2line command prints "b" if --use-symbol-table
+# RUN: llvm-addr2line --no-use-symbol-table -f -e %t.o 0x1 | FileCheck %s --check-prefix=OFF
+# OFF: foo
+# OFF-NEXT: relocatable.c
 
-# Produced from the following program, compiled with clang -g -S
-# char a;
-# char b;
-# void foo() {}
+## Produced from the following program, compiled with clang -g -S
+## (clang 14.0.6 / Debian 12).
+## char a;
+## char b;
+## void foo() {}
+
+## nm use-symbol-table.s
----------------
jh7370 wrote:

I'm not sure this comment in its current form and location is particularly clear as to its purpose. I'd either provide more context to it, or get rid of it. Also, if this first line is supposed to be the command to get the output, I don't think `nm` will do a good job of dumping the symbol table of a ".s" (assembly) file!

https://github.com/llvm/llvm-project/pull/71008


More information about the llvm-commits mailing list