aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PIC16
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-02 19:42:39 +0000
committerChris Lattner <sabre@nondot.org>2010-04-02 19:42:39 +0000
commitde4845c163a5847c82d7ce10ed0c320098bce6e0 (patch)
tree797abd5d6d511637b4b4095246b46473f88f5bf8 /lib/Target/PIC16
parentf28f8bc40eedc6304ab25dd8bed486fa08f51f70 (diff)
downloadexternal_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.zip
external_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.gz
external_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.bz2
Switch the code generator (except the JIT) onto the new DebugLoc
representation. This eliminates the 'DILocation' MDNodes for file/line/col tuples from -O0 -g codegen. This remove the old DebugLoc class, making it a typedef for DebugLoc, I'll rename NewDebugLoc next. I didn't update the JIT to use the new apis, so it will continue to work, but be as slow as before. Someone should eventually do this or, better yet, rip out the JIT debug info stuff and build the JIT on top of MC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r--lib/Target/PIC16/PIC16DebugInfo.cpp12
-rw-r--r--lib/Target/PIC16/PIC16DebugInfo.h2
2 files changed, 5 insertions, 9 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/PIC16DebugInfo.h b/lib/Target/PIC16/PIC16DebugInfo.h
index 54e27c7..4e5fb87 100644
--- a/lib/Target/PIC16/PIC16DebugInfo.h
+++ b/lib/Target/PIC16/PIC16DebugInfo.h
@@ -19,7 +19,7 @@
namespace llvm {
class MachineFunction;
- class DebugLoc;
+ class NewDebugLoc; typedef NewDebugLoc DebugLoc;
namespace PIC16Dbg {
enum VarType {
T_NULL,