[lld] r326583 - [WebAssembly] Rename global types to match the notation in the spec

Nicholas Wilson via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 06:54:34 PST 2018


Author: ncw
Date: Fri Mar  2 06:54:34 2018
New Revision: 326583

URL: http://llvm.org/viewvc/llvm-project?rev=326583&view=rev
Log:
[WebAssembly] Rename global types to match the notation in the spec

Modified:
    lld/trunk/wasm/WriterUtils.cpp

Modified: lld/trunk/wasm/WriterUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/wasm/WriterUtils.cpp?rev=326583&r1=326582&r2=326583&view=diff
==============================================================================
--- lld/trunk/wasm/WriterUtils.cpp (original)
+++ lld/trunk/wasm/WriterUtils.cpp Fri Mar  2 06:54:34 2018
@@ -194,8 +194,6 @@ std::string lld::toString(const WasmSign
 }
 
 std::string lld::toString(const WasmGlobalType &Sig) {
-  std::string S = toString(static_cast<ValType>(Sig.Type));
-  if (Sig.Mutable)
-    return "mutable " + S;
-  return S;
+  return (Sig.Mutable ? "var " : "const ") +
+      toString(static_cast<ValType>(Sig.Type));
 }




More information about the llvm-commits mailing list