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
This commit is contained in:
Reid Spencer 2004-08-29 19:37:59 +00:00
parent 57ec727933
commit 1390103887

View File

@ -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);
}