summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
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
commit915c5f9862503174ee3482543b0f371c888812c3 (patch)
tree4626ed07826ed8b43a0f1c4b243833d34f046ddf /llvm/lib/Target
parent61399375a2f9ac1eee25a04c50ccc629d73c7262 (diff)
downloadbcm5719-llvm-915c5f9862503174ee3482543b0f371c888812c3.tar.gz
bcm5719-llvm-915c5f9862503174ee3482543b0f371c888812c3.zip
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. llvm-svn: 100209
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/PIC16/PIC16DebugInfo.cpp12
-rw-r--r--llvm/lib/Target/PIC16/PIC16DebugInfo.h2
2 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16DebugInfo.cpp b/llvm/lib/Target/PIC16/PIC16DebugInfo.cpp
index da4e0278769..a223540170a 100644
--- a/llvm/lib/Target/PIC16/PIC16DebugInfo.cpp
+++ b/llvm/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/llvm/lib/Target/PIC16/PIC16DebugInfo.h b/llvm/lib/Target/PIC16/PIC16DebugInfo.h
index 54e27c7c337..4e5fb875cbe 100644
--- a/llvm/lib/Target/PIC16/PIC16DebugInfo.h
+++ b/llvm/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,
OpenPOWER on IntegriCloud