1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

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
This commit is contained in:
Reid Spencer 2004-08-29 19:37:59 +00:00
parent 3684d5e557
commit 0c3bada696

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