summaryrefslogtreecommitdiffstats
path: root/lld/wasm/WriterUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/wasm/WriterUtils.cpp')
-rw-r--r--lld/wasm/WriterUtils.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/wasm/WriterUtils.cpp b/lld/wasm/WriterUtils.cpp
index 88c3757f8c1..e2494b58b68 100644
--- a/lld/wasm/WriterUtils.cpp
+++ b/lld/wasm/WriterUtils.cpp
@@ -194,8 +194,6 @@ std::string lld::toString(const WasmSignature &Sig) {
}
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));
}
OpenPOWER on IntegriCloud