From 1390103887d092d1310807c8ef71c3dc6aa33344 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 29 Aug 2004 19:37:59 +0000 Subject: [PATCH] Add an assert to cature null Operands. It is better to catch it here than to SIGSEGV in the bowels of isa<...> later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16098 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index b109cb006eb..f70a82839aa 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/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); } -- 2.11.0