[PATCH] D110664: [Symbolize] Demangle Rust symbols
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 12 00:14:07 PDT 2021
jhenderson added a comment.
Why the functional change to allow double underscore Rust symbols?
================
Comment at: llvm/lib/Demangle/Demangle.cpp:28
+
+ if (llvm::nonMicrosoftDemangle(S, Result))
+ return Result;
----------------
I'm not sure you need the llvm qualifiers, since you're already in the llvm namespace?
================
Comment at: llvm/lib/Demangle/Demangle.cpp:31-32
+
+ if (S[0] == '_' && llvm::nonMicrosoftDemangle(S + 1, Result))
+ return Result;
+
----------------
Previously you didn't need this second call. I'm not sure I follow why you need it now?
================
Comment at: llvm/lib/Demangle/Demangle.cpp:44
+
+bool llvm::nonMicrosoftDemangle(const char *MangledName, std::string &Result) {
+ char *Demangled = nullptr;
----------------
Do we have access to `llvm::Optional` here? Not sure, as I know there are some layering issues specific to the demangler.
If we do, I think returning an optional string would be better than passing in a reference.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110664/new/
https://reviews.llvm.org/D110664
More information about the llvm-commits
mailing list