From 20dd36a48a76bb4227e19ad5da26066db5a466fa Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Tue, 11 Apr 2017 19:32:41 +0000 Subject: 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 | 3 --- 1 file changed, 3 deletions(-) (limited to 'llvm/lib/CodeGen/MIRParser/MIRParser.cpp') diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index d1f5ed47d81..a2773cccc5d 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -367,9 +367,6 @@ bool MIRParserImpl::initializeMachineFunction(MachineFunction &MF) { } PFS.SM = &SM; - if (MF.empty()) - return error(Twine("machine function '") + Twine(MF.getName()) + - "' requires at least one machine basic block in its body"); // Initialize the frame information after creating all the MBBs so that the // MBB references in the frame information can be resolved. if (initializeFrameInfo(PFS, YamlMF)) -- cgit v1.2.3