[PATCH] D113106: demangle xcoff label symbol for llvm-nm

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 7 12:50:40 PST 2021


DiggerLin added inline comments.


================
Comment at: llvm/test/tools/llvm-nm/XCOFF/demangle.test:20
+# NM-DEMANGLE-NEXT: 00000000 t .func0()
+# NM-DEMANGLE-NEXT: 00000120 b .bss
+# NM-DEMANGLE-NEXT: 00000100 d .data
----------------
DiggerLin wrote:
> jhenderson wrote:
> > This test is purely about demangling functionality. Aside from having a single test-case where a symbol isn't demangled, I don't think you need all these other cases that don't demangle.
> > 
> > Similarly, you can omit most of the test cases where demangling does occur, as long as you have one per code path.
> > 
> > I think the following set of test cases is all you should have - ignore the other symbols (or more preferably just rebase this patch on top of @Esme's yaml2obj work, so that you can use yaml2obj to generate exactly the right set of symbols):
> > # Empty name
> > # Name consisting solely of `.`
> > # Name starting with `.` that can't be demangled
> > # Name starting with `.` that can be demangled
> > # Name not starting with `.` that can't be demangled
> > # Name not starting with `.` that can be demangled
> 1. as I mentioned before, yaml2obj do not support an empty symbol.
> 2. I will reuse the test_xlclang.o which provided in the  https://reviews.llvm.org/D112450 to test empty symbol
> 3. when yam22obj, I will create to delete the test and add the empty name to test demangle_sym_name.test
sorry , It should be
3. when yam2obj support empty symbol, I will create a patch to delete the test and add the empty name to test demangle_sym_name.test


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113106/new/

https://reviews.llvm.org/D113106



More information about the llvm-commits mailing list