aboutsummaryrefslogtreecommitdiffstats
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
commitb9692a7da0e45bd941437ae1974ee6919aff5a34 (patch)
tree797abd5d6d511637b4b4095246b46473f88f5bf8 /lib/ExecutionEngine
parent52ff54e483c6882e5876d1f8081feef428a459a4 (diff)
downloadexternal_llvm-b9692a7da0e45bd941437ae1974ee6919aff5a34.zip
external_llvm-b9692a7da0e45bd941437ae1974ee6919aff5a34.tar.gz
external_llvm-b9692a7da0e45bd941437ae1974ee6919aff5a34.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/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 83acb5d..a2df2d0 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,