aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/XCore/XCoreRegisterInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-02-23 00:42:30 +0000
committerBill Wendling <isanbard@gmail.com>2009-02-23 00:42:30 +0000
commitef4cfc749a61d0d0252196c957697436ba7ec068 (patch)
tree7acb11187b1a550cfa710de0d48dd9362fc10814 /lib/Target/XCore/XCoreRegisterInfo.cpp
parent4214a5531cdbe538a358033f1847e55c4436be1b (diff)
Propagate debug loc info through prologue/epilogue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65298 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreRegisterInfo.cpp')
-rw-r--r--lib/Target/XCore/XCoreRegisterInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/XCore/XCoreRegisterInfo.cpp b/lib/Target/XCore/XCoreRegisterInfo.cpp
index 059a836c9e..ef5f9f99ac 100644
--- a/lib/Target/XCore/XCoreRegisterInfo.cpp
+++ b/lib/Target/XCore/XCoreRegisterInfo.cpp
@@ -398,7 +398,8 @@ void XCoreRegisterInfo::emitPrologue(MachineFunction &MF) const {
MachineFrameInfo *MFI = MF.getFrameInfo();
MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
XCoreFunctionInfo *XFI = MF.getInfo<XCoreFunctionInfo>();
- DebugLoc dl = DebugLoc::getUnknownLoc();
+ DebugLoc dl = (MBBI != MBB.end() ?
+ MBBI->getDebugLoc() : DebugLoc::getUnknownLoc());
bool FP = hasFP(MF);
@@ -515,7 +516,7 @@ void XCoreRegisterInfo::emitEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
MachineFrameInfo *MFI = MF.getFrameInfo();
MachineBasicBlock::iterator MBBI = prior(MBB.end());
- DebugLoc dl = DebugLoc::getUnknownLoc();
+ DebugLoc dl = MBBI->getDebugLoc();
bool FP = hasFP(MF);