[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 12:30:07 PDT 2019


mstorsjo marked an inline comment as done.
mstorsjo added inline comments.


================
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);
 }
----------------
mstorsjo wrote:
> sbc100 wrote:
> > Haven't we lost the checking of `config->demangle` here?
> Oops, yes indeed. (There wasn't any testcase for that, apparently.)
Sorry, yes, there is a test for it, but I don't have the wasm target enabled, so that particular test doesn't get run.


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

https://reviews.llvm.org/D67301





More information about the llvm-commits mailing list