From 41495a21f9e881a2bea017caad9eed731f8f37e8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 17 Nov 2003 01:17:04 +0000 Subject: [PATCH] Be a bit more tolerant of broken code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10050 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index f92fe25fd25..2c36ed98cb7 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -912,15 +912,15 @@ void AssemblyWriter::printInstruction(const Instruction &I) { writeOperand(AI->getArraySize(), true); } } else if (isa(I)) { - writeOperand(Operand, true); + if (Operand) writeOperand(Operand, true); // Work with broken code Out << " to "; printType(I.getType()); } else if (isa(I)) { - writeOperand(Operand, true); + if (Operand) writeOperand(Operand, true); // Work with broken code Out << ", "; printType(I.getType()); } else if (const VANextInst *VAN = dyn_cast(&I)) { - writeOperand(Operand, true); + if (Operand) writeOperand(Operand, true); // Work with broken code Out << ", "; printType(VAN->getArgType()); } else if (Operand) { // Print the normal way...