[PATCH] D52580: Refactor WasmSignature and use it for MCSymbolWasm

Dan Gohman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 12:21:32 PDT 2018


sunfish added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:164
+  cast<MCSymbolWasm>(CurrentFnSym)->setSignature(Signature.get());
+  addSignature(std::move(Signature));
+
----------------
With this patch as it is now, the WasmStreamer's emitParam no longer does anything, but the AsmStreamer does. This weakens the mental model of the AsmPrinter somewhat, because code like EmitFunctionBodyStart here is conceptually supposed to be "emitting assembly code" through directives, with those directives mapping to either emitting the actual text for the directives, or implementing the directives directly in binary. This mental model is useful for keeping the codegen to object file path in sync with the AsmParser to object file path.

Since I don't see a call to setSignature in the AsmParser to object file path, is it not currently supporting signatures with this patch?


Repository:
  rL LLVM

https://reviews.llvm.org/D52580





More information about the llvm-commits mailing list