[PATCH] D44323: [WebAssembly] Remove a second parameter from toString().

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 15:03:38 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLD327182: [WebAssembly] Remove a second parameter from toString(). (authored by ruiu, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D44323?vs=137818&id=137849#toc

Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D44323

Files:
  wasm/Driver.cpp
  wasm/Symbols.cpp
  wasm/Symbols.h


Index: wasm/Symbols.h
===================================================================
--- wasm/Symbols.h
+++ wasm/Symbols.h
@@ -312,7 +312,7 @@
 } // namespace wasm
 
 // Returns a symbol name for an error message.
-std::string toString(const wasm::Symbol &Sym, bool QuoteDemangled = true);
+std::string toString(const wasm::Symbol &Sym);
 std::string toString(wasm::Symbol::Kind Kind);
 std::string toString(WasmSymbolType Type);
 
Index: wasm/Driver.cpp
===================================================================
--- wasm/Driver.cpp
+++ wasm/Driver.cpp
@@ -239,8 +239,7 @@
 
     // Add a synthetic dummy for weak undefined functions.  These dummies will
     // be GC'd if not used as the target of any "call" instructions.
-    StringRef StubName =
-        Saver.save("undefined function " + toString(*Sym, false));
+    StringRef StubName = Saver.save("undefined function " + toString(*Sym));
     SyntheticFunction *Func = make<SyntheticFunction>(Sig, StubName);
     Func->setBody(UnreachableFn);
     // Ensure it compares equal to the null pointer, and so that table relocs
Index: wasm/Symbols.cpp
===================================================================
--- wasm/Symbols.cpp
+++ wasm/Symbols.cpp
@@ -180,10 +180,10 @@
 
 void LazySymbol::fetch() { cast<ArchiveFile>(File)->addMember(&ArchiveSymbol); }
 
-std::string lld::toString(const wasm::Symbol &Sym, bool QuoteDemangled) {
+std::string lld::toString(const wasm::Symbol &Sym) {
   if (Config->Demangle)
     if (Optional<std::string> S = demangleItanium(Sym.getName()))
-      return QuoteDemangled ? ("`" + *S + "'") : *S;
+      return *S;
   return Sym.getName();
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44323.137849.patch
Type: text/x-patch
Size: 1662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180309/6272f443/attachment.bin>


More information about the llvm-commits mailing list