diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-27 01:52:34 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-27 01:52:34 +0000 |
commit | ddcfd9e6fafdbbe5c973477e537119e73c115ee4 (patch) | |
tree | e63a374ee16ecfaff57b2dc810af25e2c9952c43 | |
parent | 8fa16e47f88975b577fe1cafce1a366b78b2c340 (diff) |
Fix crash caused by passing register 0 to
MRegisterInfo::isPhysicalRegister().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11894 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 030cb7ef0c..1e77988be5 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -199,7 +199,7 @@ static inline std::ostream& OutputValue(std::ostream &os, const Value* val) { 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 |