Print PHI nodes with zero operands even if they are illegal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-11-06 01:48:45 +00:00
parent c109d30239
commit 8f410cac04

View File

@ -517,12 +517,11 @@ void AssemblyWriter::printInstruction(const Instruction *I) {
Out << "\n\t]";
} else if (isa<PHINode>(I)) {
Out << " ";
printType(Operand->getType());
printType(I->getType());
Out << " ["; writeOperand(Operand, false); Out << ",";
writeOperand(I->getOperand(1), false); Out << " ]";
for (unsigned op = 2, Eop = I->getNumOperands(); op < Eop; op += 2) {
Out << ", [";
for (unsigned op = 0, Eop = I->getNumOperands(); op < Eop; op += 2) {
if (op) Out << ", ";
Out << "[";
writeOperand(I->getOperand(op ), false); Out << ",";
writeOperand(I->getOperand(op+1), false); Out << " ]";
}