[PATCH] D138595: [llvm-cxxfilt] Support Microsoft demangling format

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 11:04:39 PST 2022


dblaikie added a comment.

In D138595#3959825 <https://reviews.llvm.org/D138595#3959825>, @thieta wrote:

> In D138595#3957652 <https://reviews.llvm.org/D138595#3957652>, @dblaikie wrote:
>
>> Ping on this ^?
>
> Ah sorry - I thought I replied to this, but I just replied in my head.
>
> Yes, I like this idea, but it does feel like we are getting into the territory where we have to refactor the API to demangle since the demangle functions have different return values and handling.
>
> I am happy to do this, but I am not sure it's part of this diff. IMHO it's probably better to land this and then refactor the demangle API in its own diff.

I'd rather avoid the technical debt of duplicating the is* functions only to figure out how to remove them later - the refactoring could go in before this patch to make the APIs amenable to this sort of usage.



================
Comment at: llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp:120
+    if (Format == DemangleFormatTy::AutoDetect)
+      if (auto D = demangleFormat(MangledName, DemangleFormatTy::Microsoft))
+        return D;
----------------
Adding recursion in here is a bit quirky (& calling this generic function only to ask for one particular mangling, when there's direct functions for specific manglings) - could this be another call to `microsoftDemangle` directly here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138595



More information about the llvm-commits mailing list