MIR Parser: Report an error when parsing machine function with an empty body.
authorAlex Lorenz <arphaman@gmail.com>
Thu, 9 Jul 2015 21:21:33 +0000 (21:21 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Thu, 9 Jul 2015 21:21:33 +0000 (21:21 +0000)
commitccba68af825569c39b30521607d9659f0d15f9e0
tree7f257579f59408b3fb69b04036cc3ae649e3c76c
parent847c023a2eddc947390b80df30901ff4476d1224
MIR Parser: Report an error when parsing machine function with an empty body.

This commit adds a new error which is reported when the MIR Parser encounters
a machine function without any machine basic blocks. The machine verifier
expects that the machine functions have at least one MBB, and this error will
prevent machine functions without MBBs from reaching the machine verifier and
crashing with an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241862 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MIRParser/MIRParser.cpp
test/CodeGen/MIR/llvmIR.mir
test/CodeGen/MIR/llvmIRMissing.mir
test/CodeGen/MIR/machine-function-missing-body-error.mir [new file with mode: 0644]
test/CodeGen/MIR/machine-function-missing-function.mir
test/CodeGen/MIR/machine-function-missing-name.mir
test/CodeGen/MIR/machine-function.mir
test/CodeGen/MIR/register-info.mir