summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-08-29 19:37:59 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-08-29 19:37:59 +0000
commit3311669903f597f9d0351fb635bccca211a7c3bc (patch)
tree41efe0a688718fc8779ccd901b0ac097809d4bf4 /llvm/lib
parent6fca37236d31874baf157e723e8d9bac6970280d (diff)
downloadbcm5719-llvm-3311669903f597f9d0351fb635bccca211a7c3bc.tar.gz
bcm5719-llvm-3311669903f597f9d0351fb635bccca211a7c3bc.zip
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
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp1
1 files changed, 1 insertions, 0 deletions
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);
}
OpenPOWER on IntegriCloud