[PATCH] D139864: [llvm-cxxfilt] Not consider the prefix dot as part of the demangled symbol name.
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 15:54:55 PDT 2023
hubert.reinterpretcast added a comment.
In D139864#4310484 <https://reviews.llvm.org/D139864#4310484>, @DiggerLin wrote:
> I think it is difficult to implement the functionality in LLVMDemangle, for example, if I implement the functionality in the function llvm::nonMicrosoftDemangle(const char *MangledName, std::string &Result)
>
> it will cause the symbol name "_._Z3f.0v" to be demangled as ".f.0()" in some place.
>
> for example ,in the file Demangle.cpp
>
> std::string llvm::demangle(const std::string &MangledName) {
> std::string Result;
> const char *S = MangledName.c_str();
>
> if (nonMicrosoftDemangle(S, Result))
> return Result;
>
> if (S[0] == '_' && nonMicrosoftDemangle(S + 1, Result))
> return Result;
> ....
> }
Would adding a `if (S[0] == '.' && nonMicrosoftDemangle(S + 1, Result))` case there be appropriate?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139864/new/
https://reviews.llvm.org/D139864
More information about the llvm-commits
mailing list