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

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 16:17:55 PST 2022


dblaikie added a comment.

In D138595#3965948 <https://reviews.llvm.org/D138595#3965948>, @jhenderson wrote:

> In D138595#3965634 <https://reviews.llvm.org/D138595#3965634>, @dblaikie wrote:
>
>> Does that sound feasible? @jhenderson does that sound reasonable? (got other ideas about how this should all be factored?)
>
> Yeah, that all sounds sensible to me. I think I recall it bugging me that there's no easy way of telling whether demangling failed because it was e.g. Itanium (based on the leading characters), but not a valid such encoding, so having the ability to report an `Error` to the caller to help with this would certainly be good. The only issue with this approach is that I recall at one point that the demangling library is I recall something to do with the layering of the demangler library is such that it is depended upon by the Support library, and not the other way around. Alternatively, it might have been an issue with the fact that (in theory) Demangle.h is a copy of somewhere else, IIRC (there's a comment to this effect near the top of the file). I don't know if that's still an issue though.
>
> Worst case, we could return some sort of enum error code or provide a callback function of some kind instead in place of `llvm::Error`.

Ooooh, right. Yeah, that sounds like it's the case to me. So... so, std::error_code? (I thought maybe we had an LLVM error code-ish thing too, but I don't recall, maybe it's been fully replaced by llvm::Error, if it did exist) Pick a blessed value to communicate "this input isn't handled here, maybe someone else knows what it is" as distinct from "this input is mine, but it's broken".


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