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
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index b109cb0..f70a828 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -744,6 +744,7 @@
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);
}