From db7a9e291ae6eb2fd8ff5890efb1ee46ab8b8724 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 15 Jan 2009 18:40:57 +0000 Subject: [PATCH] add comment to explain my previous commit, as asked by Chris llvm-svn: 62272 --- lib/VMCore/AsmWriter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 8139e822ee6..bdc50b6c697 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1671,6 +1671,8 @@ void AssemblyWriter::printInstruction(const Instruction &I) { } else { for (unsigned i = 1, E = I.getNumOperands(); i != E; ++i) { Operand = I.getOperand(i); + // note that Operand shouldn't be null, but the test helps make dump() + // more tolerant of malformed IR if (Operand && Operand->getType() != TheType) { PrintAllTypes = true; // We have differing types! Print them all! break;