[PATCH] D53620: [WebAssembly] Error out when block/loop markers mismatch

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 24 00:03:00 PDT 2018


aheejin added a comment.

This kind of code should never be produced by the wasm backend, right. I made these not assertions but fatal errors because I thought there can be cases when we do only parsing and printing, such as in llvm-mc. But on a second thought, maybe in that case the errors should rather be detected not in InstPrinter but in AsmParser. AsmParser seems to provide better error handling, in which every method returns `Error` object and such. So I think these are better be assertions, and we rely on AsmParser on the correct error handling. What do you think? But anyway, in either case I don't think we should silently ignore these errors as the current code does.

And yes, I will give a try on llvm-mc test. Thanks.


Repository:
  rL LLVM

https://reviews.llvm.org/D53620





More information about the llvm-commits mailing list