[PATCH] D67301: [LLD] Use the unified llvm demangle frontend function. NFC.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 10:38:03 PDT 2019
mstorsjo marked 2 inline comments as done.
mstorsjo added inline comments.
================
Comment at: lld/COFF/Symbols.cpp:38
+ demangleInput.consume_front("_");
+ std::string demangled = demangle(demangleInput, /* StrictPrefix */ true);
+ if (demangled != demangleInput)
----------------
sbc100 wrote:
> I think the convention is to use `/*StrictPrefix=*/true`. i.e. no spaces and an equals.
Ok, will change all of them to that form
================
Comment at: lld/wasm/Symbols.cpp:303
std::string lld::toString(const wasm::Symbol &sym) {
- return lld::maybeDemangleSymbol(sym.getName());
-}
-
-std::string lld::maybeDemangleSymbol(StringRef name) {
- if (config->demangle)
- if (Optional<std::string> s = demangleItanium(name))
- return *s;
- return name;
+ return demangle(sym.getName(), /* StrictPrefix */ true);
}
----------------
sbc100 wrote:
> Haven't we lost the checking of `config->demangle` here?
Oops, yes indeed. (There wasn't any testcase for that, apparently.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67301/new/
https://reviews.llvm.org/D67301
More information about the llvm-commits
mailing list