MIR: Allow parsing of empty machine functions
If you run llc -stop-after=codegenprepare and feed the resulting MIR
to llc -start-after=codegenprepare, you'll have an empty machine
function since we haven't run any isel yet. Of course, this only works
if the MIRParser believes you that this is okay.
This is essentially a revert of r241862 with a fix for the problem it
was papering over.
llvm-svn: 299975
diff --git a/llvm/test/CodeGen/MIR/Generic/machine-function.mir b/llvm/test/CodeGen/MIR/Generic/machine-function.mir
index f9001cc..9c19b98 100644
--- a/llvm/test/CodeGen/MIR/Generic/machine-function.mir
+++ b/llvm/test/CodeGen/MIR/Generic/machine-function.mir
@@ -18,7 +18,7 @@
define i32 @func2() {
ret i32 0
}
-
+
...
---
# CHECK: name: foo
@@ -26,8 +26,6 @@
# CHECK-NEXT: exposesReturnsTwice: false
# CHECK: ...
name: foo
-body: |
- bb.0:
...
---
# CHECK: name: bar
@@ -35,8 +33,6 @@
# CHECK-NEXT: exposesReturnsTwice: false
# CHECK: ...
name: bar
-body: |
- bb.0:
...
---
# CHECK: name: func
@@ -45,8 +41,6 @@
# CHECK: ...
name: func
alignment: 8
-body: |
- bb.0:
...
---
# CHECK: name: func2
@@ -56,6 +50,4 @@
name: func2
alignment: 16
exposesReturnsTwice: true
-body: |
- bb.0:
...