Эх сурвалжийг харах

Improve debug error message with register name

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280583 91177308-0d34-0410-b5e6-96231b3b80d8
Matt Arsenault 9 жил өмнө
parent
commit
59ff7095a9

+ 2 - 1
lib/CodeGen/LiveRangeCalc.cpp

@@ -374,7 +374,8 @@ bool LiveRangeCalc::findReachingDefs(LiveRange &LR, MachineBasicBlock &UseMBB,
     if (TargetRegisterInfo::isPhysicalRegister(PhysReg) &&
         !MBB->isLiveIn(PhysReg)) {
       MBB->getParent()->verify();
-      errs() << "The register " << PrintReg(PhysReg)
+      const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo();
+      errs() << "The register " << PrintReg(PhysReg, TRI)
              << " needs to be live in to BB#" << MBB->getNumber()
              << ", but is missing from the live-in list.\n";
       llvm_unreachable("Invalid global physical register");