[PATCH] D62617: [MIR-Canon] Fixing case where MachineFunction is empty.

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 11:43:49 PDT 2019


plotfi marked an inline comment as done.
plotfi added inline comments.


================
Comment at: llvm/test/CodeGen/MIR/AArch64/empty-MF.mir:4-8
+--- |
+  define void @foo() {
+    ret void
+  }
+...
----------------
bogner wrote:
> This is kind of a confusing way to do this - the function certainly doesn't look empty and you're relying on the fact that not providing the mir gives us something empty-ish. I'd probably drop the IR completely and write out the mir you want:
> ```
> ---
> name: foo
> body:             |
> ...
> ```
I will give this a try. This is what was crashing the other test though. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62617





More information about the llvm-commits mailing list