[PATCH] D12307: WebAssembly: emit `(func (param t) (result t))` s-expressions

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 15:39:13 PDT 2015


sunfishcode added a subscriber: sunfishcode.
sunfishcode accepted this revision.
sunfishcode added a reviewer: sunfishcode.
This revision is now accepted and ready to land.

================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:106
@@ +105,3 @@
+  }
+  DEBUG(dbgs() << "Invalid type "; Ty->print(dbgs()); dbgs() << '\n');
+  return "<invalid>";
----------------
Please put an assert or llvm_unreachable or something here to make sure this gets caught.

================
Comment at: lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:145
@@ +144,3 @@
+  raw_svector_ostream OS(Str);
+  OS << ") ;; End func " << toSymbol(CurrentFnSym->getName()) << '\n';
+  OutStreamer->EmitRawText(OS.str());
----------------
This is subjective, but my preference would be to omit this comment, as it adds clutter. If you want to keep it, would you mind making it lower-case?


http://reviews.llvm.org/D12307





More information about the llvm-commits mailing list