From 3311669903f597f9d0351fb635bccca211a7c3bc Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 29 Aug 2004 19:37:59 +0000 Subject: Add an assert to cature null Operands. It is better to catch it here than to SIGSEGV in the bowels of isa<...> later. llvm-svn: 16098 --- llvm/lib/VMCore/AsmWriter.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib') diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index b109cb006eb..f70a82839aa 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -744,6 +744,7 @@ std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) { void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType, bool PrintName) { + assert(Operand != 0 && "Illegal Operand"); if (PrintType) { Out << ' '; printType(Operand->getType()); } WriteAsOperandInternal(Out, Operand, PrintName, TypeNames, &Machine); } -- cgit v1.2.3