[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp

Reid Spencer reid at x10sys.com
Sun Aug 29 12:38:10 PDT 2004



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.156 -> 1.157
---
Log message:

Add an assert to cature null Operands. It is better to catch it here than
to SIGSEGV in the bowels of isa<...> later.


---
Diffs of the changes:  (+1 -0)

Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.156 llvm/lib/VMCore/AsmWriter.cpp:1.157
--- llvm/lib/VMCore/AsmWriter.cpp:1.156	Fri Aug 20 10:37:30 2004
+++ llvm/lib/VMCore/AsmWriter.cpp	Sun Aug 29 14:37:59 2004
@@ -744,6 +744,7 @@
 
 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);
 }






More information about the llvm-commits mailing list