MIR: Allow parsing of empty machine functions
authorJustin Bogner <mail@justinbogner.com>
Tue, 11 Apr 2017 19:32:41 +0000 (19:32 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 11 Apr 2017 19:32:41 +0000 (19:32 +0000)
commit20dd36a48a76bb4227e19ad5da26066db5a466fa
treedf04a68185ca6f2a7db770221a16b346187c3c01
parent203eef0ed57a849d6d76ed57ee1963d1c49a5b30
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
llvm/lib/CodeGen/MIRParser/MIRParser.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/test/CodeGen/MIR/Generic/llvmIR.mir
llvm/test/CodeGen/MIR/Generic/llvmIRMissing.mir
llvm/test/CodeGen/MIR/Generic/machine-function-missing-body-error.mir [deleted file]
llvm/test/CodeGen/MIR/Generic/machine-function-missing-body.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/Generic/machine-function-missing-function.mir
llvm/test/CodeGen/MIR/Generic/machine-function-missing-name.mir
llvm/test/CodeGen/MIR/Generic/machine-function.mir
llvm/test/CodeGen/MIR/Generic/register-info.mir