diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-08-29 19:37:59 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-08-29 19:37:59 +0000 |
commit | 1390103887d092d1310807c8ef71c3dc6aa33344 (patch) | |
tree | 5a7903981dc877fb3251fe91b0e79265e4225716 /lib/VMCore | |
parent | 57ec727933982d9095c6a58b06d3e14379784e87 (diff) | |
download | external_llvm-1390103887d092d1310807c8ef71c3dc6aa33344.zip external_llvm-1390103887d092d1310807c8ef71c3dc6aa33344.tar.gz external_llvm-1390103887d092d1310807c8ef71c3dc6aa33344.tar.bz2 |
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index b109cb0..f70a828 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); } |