[llvm] [llvm-objdump] Document selecting symbols containing commas (PR #221619)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 01:18:04 PDT 2026


================
@@ -19,6 +19,15 @@
 # RUN: llvm-objdump -C --disassemble-symbols='std::allocator<wchar_t>::allocator()' %t.o 2>&1 \
 # RUN:   | FileCheck %s --check-prefix=DEMANGLED-MULTI
 
+## --disassemble=<symbol> preserves commas and implies disassembly. It can be
+## repeated or combined with --disassemble-symbols to select multiple symbols.
----------------
jh7370 wrote:

I'm not convinced that there is a benefit to the test cases for mixing the two options, but I'm not strongly opposed to them. However, if they are going to exist, this is the wrong file for them. This test file is for the interaction of the options with `--demangle`.

I also don't think we need to note that the option implies disassembly. That again isn't related to name demangling (and there is already testing for it elsewhere).

Next, "preserves commas" isn't really the right term here and gives the wrong focus. The focus of the test should be that `--disassemble=<symbol>` with `--demangle` takes a demangled name. It's probably worth calling out the comma behaviour as a secondary point though. Suggested comment, to mirror the existing --disassemble-symbols comments:
```
## --disassemble=<symbol> with --demangle. Test using a symbol name containing commas, to show that commas are treated as part of the symbol name in this case.
```
(Wrap the comment appropriately). I also note that the original author (@pcc), specifically stated that they didn't feel it important to test commas specifically (see https://github.com/llvm/llvm-project/pull/196594#pullrequestreview-4284004236). Why do you feel it is important?

Finally, you need similar cases but without `--demangle`, just like the above cases in the test file.

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


More information about the llvm-commits mailing list