From c8704b02df54ff109f3fe28798aed5ff8b8ecb29 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 9 Jul 2015 21:21:33 +0000 Subject: 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/test/CodeGen/MIR/machine-function-missing-name.mir | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/test/CodeGen/MIR/machine-function-missing-name.mir') diff --git a/llvm/test/CodeGen/MIR/machine-function-missing-name.mir b/llvm/test/CodeGen/MIR/machine-function-missing-name.mir index b16156e54bd..a868a65d35f 100644 --- a/llvm/test/CodeGen/MIR/machine-function-missing-name.mir +++ b/llvm/test/CodeGen/MIR/machine-function-missing-name.mir @@ -16,7 +16,11 @@ --- # CHECK: [[@LINE+1]]:1: missing required key 'name' nme: foo +body: + - id: 0 ... --- name: bar +body: + - id: 0 ... -- cgit v1.2.3