Fix crash caused by passing register 0 to

MRegisterInfo::isPhysicalRegister().

llvm-svn: 11894
This commit is contained in:
Alkis Evlogimenos 2004-02-27 01:52:34 +00:00
parent cff0fc180c
commit 3093de5bfb

View File

@ -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