[PATCH] D113295: [flang] Transform `fir.end` to an empty statement

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 5 11:37:06 PDT 2021


mehdi_amini added inline comments.


================
Comment at: flang/include/flang/Optimizer/Dialect/FIROps.td:812
+
+  let parser = "return mlir::success();";
 }
----------------
mehdi_amini wrote:
> You need this to be able to parse the "pretty" form. But do you need one?
If you ever need a trivial custom form in the future, the preferred way would be to write it as `let assemblyFormat = "attr-dict-with-keyword";`

The assemblyFormat makes sure that you don't forget elements, like the optional dictionary of attributes here :)




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113295/new/

https://reviews.llvm.org/D113295



More information about the llvm-commits mailing list