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

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 16 19:18:01 PST 2003


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.110 -> 1.111

---
Log message:

Be a bit more tolerant of broken code


---
Diffs of the changes:  (+3 -3)

Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.110 llvm/lib/VMCore/AsmWriter.cpp:1.111
--- llvm/lib/VMCore/AsmWriter.cpp:1.110	Sun Nov 16 17:08:27 2003
+++ llvm/lib/VMCore/AsmWriter.cpp	Sun Nov 16 19:17:04 2003
@@ -912,15 +912,15 @@
       writeOperand(AI->getArraySize(), true);
     }
   } else if (isa<CastInst>(I)) {
-    writeOperand(Operand, true);
+    if (Operand) writeOperand(Operand, true);   // Work with broken code
     Out << " to ";
     printType(I.getType());
   } else if (isa<VAArgInst>(I)) {
-    writeOperand(Operand, true);
+    if (Operand) writeOperand(Operand, true);   // Work with broken code
     Out << ", ";
     printType(I.getType());
   } else if (const VANextInst *VAN = dyn_cast<VANextInst>(&I)) {
-    writeOperand(Operand, true);
+    if (Operand) writeOperand(Operand, true);   // Work with broken code
     Out << ", ";
     printType(VAN->getArgType());
   } else if (Operand) {   // Print the normal way...





More information about the llvm-commits mailing list