diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-04-03 07:51:10 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-04-03 07:51:10 +0000 |
commit | 62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a (patch) | |
tree | ba3309de92b14839b2ca6ca0c6d3b39714f95d4c /lib/Target/PIC16 | |
parent | 20e856b2a58d12231aa42d5d13888b15ac03e5a4 (diff) | |
download | FreeBSD-src-62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a.zip FreeBSD-src-62cc576dca6a6aa62c0424f0a1e93a0a679d4c8a.tar.gz |
Update LLVM to r100285.
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r-- | lib/Target/PIC16/PIC16DebugInfo.cpp | 12 | ||||
-rw-r--r-- | lib/Target/PIC16/PIC16InstrInfo.cpp | 8 |
2 files changed, 8 insertions, 12 deletions
diff --git a/lib/Target/PIC16/PIC16DebugInfo.cpp b/lib/Target/PIC16/PIC16DebugInfo.cpp index da4e027..a223540 100644 --- a/lib/Target/PIC16/PIC16DebugInfo.cpp +++ b/lib/Target/PIC16/PIC16DebugInfo.cpp @@ -256,15 +256,11 @@ void PIC16DbgInfo::BeginFunction(const MachineFunction &MF) { /// void PIC16DbgInfo::ChangeDebugLoc(const MachineFunction &MF, const DebugLoc &DL, bool IsInBeginFunction) { - if (! EmitDebugDirectives) return; - assert (! DL.isUnknown() && "can't change to invalid debug loc"); - - DILocation Loc = MF.getDILocation(DL); - MDNode *CU = Loc.getScope().getNode(); - unsigned line = Loc.getLineNumber(); + if (!EmitDebugDirectives) return; + assert(!DL.isUnknown() && "can't change to invalid debug loc"); - SwitchToCU(CU); - SwitchToLine(line, IsInBeginFunction); + SwitchToCU(DL.getScope(MF.getFunction()->getContext())); + SwitchToLine(DL.getLine(), IsInBeginFunction); } /// SwitchToLine - Emit line directive for a new line. diff --git a/lib/Target/PIC16/PIC16InstrInfo.cpp b/lib/Target/PIC16/PIC16InstrInfo.cpp index da16e83..365e8b2 100644 --- a/lib/Target/PIC16/PIC16InstrInfo.cpp +++ b/lib/Target/PIC16/PIC16InstrInfo.cpp @@ -72,7 +72,7 @@ void PIC16InstrInfo::storeRegToStackSlot(MachineBasicBlock &MBB, unsigned SrcReg, bool isKill, int FI, const TargetRegisterClass *RC) const { PIC16TargetLowering *PTLI = TM.getTargetLowering(); - DebugLoc DL = DebugLoc::getUnknownLoc(); + DebugLoc DL; if (I != MBB.end()) DL = I->getDebugLoc(); const Function *Func = MBB.getParent()->getFunction(); @@ -114,7 +114,7 @@ void PIC16InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB, unsigned DestReg, int FI, const TargetRegisterClass *RC) const { PIC16TargetLowering *PTLI = TM.getTargetLowering(); - DebugLoc DL = DebugLoc::getUnknownLoc(); + DebugLoc DL; if (I != MBB.end()) DL = I->getDebugLoc(); const Function *Func = MBB.getParent()->getFunction(); @@ -154,7 +154,7 @@ bool PIC16InstrInfo::copyRegToReg (MachineBasicBlock &MBB, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *DestRC, const TargetRegisterClass *SrcRC) const { - DebugLoc DL = DebugLoc::getUnknownLoc(); + DebugLoc DL; if (I != MBB.end()) DL = I->getDebugLoc(); if (DestRC == PIC16::FSR16RegisterClass) { @@ -202,7 +202,7 @@ InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, if (FBB == 0) { // One way branch. if (Cond.empty()) { // Unconditional branch? - DebugLoc dl = DebugLoc::getUnknownLoc(); + DebugLoc dl; BuildMI(&MBB, dl, get(PIC16::br_uncond)).addMBB(TBB); } return 1; |