[PATCH] D111415: [Demangle] Add support for D simple qualified names

Luís Ferreira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 19 19:08:25 PST 2021


ljmf00 added a comment.

In D111415#3140916 <https://reviews.llvm.org/D111415#3140916>, @dblaikie wrote:

> Still seems a bit long in one patch/hard to verify that all the cases are covered by tests, etc. Could you break this up further - maybe implementing only the most basic, single 'parseIdentifier' case, then the iteration, then the anonymous symbols, then the lnames?

I have to disagree here a bit, but I'm going to do it anyway since I really want to go forward with this and don't lose time discussing this nit. I think parsing LName special cases could be indeed in another patch, but either anonymous symbols and identifier iteration are really little things. About anonymous symbols, we are talking about 5 lines of code that are trivial:

  // Skip over anonymous symbols.
      if (*Mangled == '0') {
        do
          ++Mangled;
        while (*Mangled == '0');
  
        continue;
      }

And the iteration with an if for adding the dot is a simple do while dependent on `isSymbolName` which currently just checks if the next char is a digit or not before parsing another node, which is like 10 lines of code.

I'm going to also separate the fake parent symbols, which is not yet in the spec. See here for context https://github.com/dlang/dlang.org/pull/3124 .


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

https://reviews.llvm.org/D111415



More information about the llvm-commits mailing list