aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
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
commit1390103887d092d1310807c8ef71c3dc6aa33344 (patch)
tree5a7903981dc877fb3251fe91b0e79265e4225716 /lib/VMCore/AsmWriter.cpp
parent57ec727933982d9095c6a58b06d3e14379784e87 (diff)
downloadexternal_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/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp1
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);
}