[PATCH] D54652: [WebAssembly] replaced .param/.result by .functype

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 16:12:09 PST 2018


dschuff accepted this revision.
dschuff added a comment.

otherwise LGTM!



================
Comment at: lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp:189
+  Optional<wasm::ValType> ParseType(const StringRef &Type) {
+    // FIXME: can't use StringSwitch because wasm::ValType doesn't have a
+    // "invalid" value.
----------------
at least the `operator ==` overload on `StringRef` makes this code not as bad as it could be?


================
Comment at: lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp:377
+                    TOut.getStreamer().getContext().getOrCreateSymbol(SymName));
+      WasmSym->setType(wasm::WASM_SYMBOL_TYPE_GLOBAL);
+      auto Signature = make_unique<wasm::WasmSignature>();
----------------
why set and then reset the symbol type? all of the intervening returns are error conditions, right?


Repository:
  rL LLVM

https://reviews.llvm.org/D54652





More information about the llvm-commits mailing list