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)
commitc8704b02df54ff109f3fe28798aed5ff8b8ecb29
tree719148d7f61da0821d7e4fb85c8c9dde785644ad
parentdcb9f0907f15c5a660cf8f9ffe315015af5fcaff
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.

llvm-svn: 241862
llvm/lib/CodeGen/MIRParser/MIRParser.cpp
llvm/test/CodeGen/MIR/llvmIR.mir
llvm/test/CodeGen/MIR/llvmIRMissing.mir
llvm/test/CodeGen/MIR/machine-function-missing-body-error.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/machine-function-missing-function.mir
llvm/test/CodeGen/MIR/machine-function-missing-name.mir
llvm/test/CodeGen/MIR/machine-function.mir
llvm/test/CodeGen/MIR/register-info.mir