summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine
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/ExecutionEngine
parentf28f8bc40eedc6304ab25dd8bed486fa08f51f70 (diff)
downloadllvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.gz
llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.bz2
llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.xz
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/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 83acb5df97..a2df2d09b8 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -821,21 +821,20 @@ void *JITEmitter::getPointerToGVIndirectSym(GlobalValue *V, void *Reference) {
}
void JITEmitter::processDebugLoc(DebugLoc DL, bool BeforePrintingInsn) {
- if (!DL.isUnknown()) {
- DILocation CurDLT = EmissionDetails.MF->getDILocation(DL);
-
- if (BeforePrintingInsn) {
- if (CurDLT.getScope().getNode() != 0
- && PrevDLT.getNode() != CurDLT.getNode()) {
- JITEvent_EmittedFunctionDetails::LineStart NextLine;
- NextLine.Address = getCurrentPCValue();
- NextLine.Loc = DL;
- EmissionDetails.LineStarts.push_back(NextLine);
- }
+ if (DL.isUnknown()) return;
+ if (!BeforePrintingInsn) return;
- PrevDLT = CurDLT;
- }
+ // FIXME: This is horribly inefficient.
+ DILocation CurDLT(DL.getAsMDNode(CurFn->getContext()));
+
+ if (CurDLT.getScope().getNode() != 0 && PrevDLT.getNode() !=CurDLT.getNode()){
+ JITEvent_EmittedFunctionDetails::LineStart NextLine;
+ NextLine.Address = getCurrentPCValue();
+ NextLine.Loc = DL;
+ EmissionDetails.LineStarts.push_back(NextLine);
}
+
+ PrevDLT = CurDLT;
}
static unsigned GetConstantPoolSizeInBytes(MachineConstantPool *MCP,