aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Alpha
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/Alpha
parent4214a5531cdbe538a358033f1847e55c4436be1b (diff)
downloadexternal_llvm-ef4cfc749a61d0d0252196c957697436ba7ec068.zip
external_llvm-ef4cfc749a61d0d0252196c957697436ba7ec068.tar.gz
external_llvm-ef4cfc749a61d0d0252196c957697436ba7ec068.tar.bz2
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/Alpha')
-rw-r--r--lib/Target/Alpha/AlphaRegisterInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp
index 2ed8dac..feee6e4 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);