From 6888dbcda7890b28ae31056cf72addbff5a381a2 Mon Sep 17 00:00:00 2001 From: Quentin Colombet Date: Tue, 19 Sep 2017 22:03:50 +0000 Subject: Revert "[MIRPrinter] Print empty successor lists when they cannot be guessed" This reverts commit r313685. I thought I had ran ninja check, but apparently I didn't... Need to update a bunch of mir tests. llvm-svn: 313686 --- llvm/lib/CodeGen/MIRPrinter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 6347e6da942..db9ccef8a36 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -598,7 +598,8 @@ void MIPrinter::print(const MachineBasicBlock &MBB) { bool HasLineAttributes = false; // Print the successors bool canPredictProbs = canPredictBranchProbabilities(MBB); - if (!SimplifyMIR || !canPredictProbs || !canPredictSuccessors(MBB)) { + if (!MBB.succ_empty() && (!SimplifyMIR || !canPredictProbs || + !canPredictSuccessors(MBB))) { OS.indent(2) << "successors: "; for (auto I = MBB.succ_begin(), E = MBB.succ_end(); I != E; ++I) { if (I != MBB.succ_begin()) -- cgit v1.2.3