diff options
Diffstat (limited to 'lib/Target/Alpha/AlphaRegisterInfo.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaRegisterInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp index 2ed8dac16a..feee6e467f 100644 --- a/lib/Target/Alpha/AlphaRegisterInfo.cpp +++ b/lib/Target/Alpha/AlphaRegisterInfo.cpp @@ -202,7 +202,8 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const { MachineBasicBlock &MBB = MF.front(); // Prolog goes in entry BB MachineBasicBlock::iterator MBBI = MBB.begin(); MachineFrameInfo *MFI = MF.getFrameInfo(); - DebugLoc dl = DebugLoc::getUnknownLoc(); + DebugLoc dl = (MBBI != MBB.end() ? + MBBI->getDebugLoc() : DebugLoc::getUnknownLoc()); bool FP = hasFP(MF); static int curgpdist = 0; @@ -268,7 +269,7 @@ void AlphaRegisterInfo::emitEpilogue(MachineFunction &MF, assert((MBBI->getOpcode() == Alpha::RETDAG || MBBI->getOpcode() == Alpha::RETDAGp) && "Can only insert epilog into returning blocks"); - DebugLoc dl = DebugLoc::getUnknownLoc(); + DebugLoc dl = MBBI->getDebugLoc(); bool FP = hasFP(MF); |