[llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp

Alkis Evlogimenos alkis at niobe.cs.uiuc.edu
Thu Feb 26 19:53:01 PST 2004


Changes in directory llvm/lib/CodeGen:

MachineInstr.cpp updated: 1.93 -> 1.94

---
Log message:

Fix crash caused by passing register 0 to
MRegisterInfo::isPhysicalRegister().


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

Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.93 llvm/lib/CodeGen/MachineInstr.cpp:1.94
--- llvm/lib/CodeGen/MachineInstr.cpp:1.93	Mon Feb 23 12:40:08 2004
+++ llvm/lib/CodeGen/MachineInstr.cpp	Thu Feb 26 19:52:34 2004
@@ -199,7 +199,7 @@
 
 static inline void OutputReg(std::ostream &os, unsigned RegNo,
                              const MRegisterInfo *MRI = 0) {
-  if (MRegisterInfo::isPhysicalRegister(RegNo)) {
+  if (!RegNo || MRegisterInfo::isPhysicalRegister(RegNo)) {
     if (MRI)
       os << "%" << MRI->get(RegNo).Name;
     else





More information about the llvm-commits mailing list