mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
8fa16e47f8
commit
ddcfd9e6fa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user