diff options
| author | Devang Patel <dpatel@apple.com> | 2009-10-06 03:04:58 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-10-06 03:04:58 +0000 |
| commit | eb43b170740e57faf615ffab5008b52582a7efd8 (patch) | |
| tree | d60c79f12c165244f3a05e3345591c1b9b1f83b1 | |
| parent | 051454a16f1db9c4081baa786ab7b724be00bb30 (diff) | |
| download | bcm5719-llvm-eb43b170740e57faf615ffab5008b52582a7efd8.tar.gz bcm5719-llvm-eb43b170740e57faf615ffab5008b52582a7efd8.zip | |
Update processDebugLoc() to handle requests to process debug info, before and after emitting instructions.
llvm-svn: 83364
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index 85483564eb5..e8314a1d866 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -597,7 +597,7 @@ namespace { /// MachineRelocations that reference external functions by name. const StringMap<void*> &getExternalFnStubs() const { return ExtFnStubs; } - virtual void processDebugLoc(DebugLoc DL); + virtual void processDebugLoc(DebugLoc DL, bool BeforePrintingInsn); virtual void emitLabel(uint64_t LabelID) { if (LabelLocations.size() <= LabelID) @@ -708,18 +708,20 @@ void JITEmitter::AddStubToCurrentFunction(void *StubAddr) { FnRefs.insert(CurFn); } -void JITEmitter::processDebugLoc(DebugLoc DL) { +void JITEmitter::processDebugLoc(DebugLoc DL, bool BeforePrintingInsn) { if (!DL.isUnknown()) { DebugLocTuple CurDLT = EmissionDetails.MF->getDebugLocTuple(DL); - if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) { - JITEvent_EmittedFunctionDetails::LineStart NextLine; - NextLine.Address = getCurrentPCValue(); - NextLine.Loc = DL; - EmissionDetails.LineStarts.push_back(NextLine); + if (BeforePrintingInsn) { + if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) { + JITEvent_EmittedFunctionDetails::LineStart NextLine; + NextLine.Address = getCurrentPCValue(); + NextLine.Loc = DL; + EmissionDetails.LineStarts.push_back(NextLine); + } + + PrevDLT = CurDLT; } - - PrevDLT = CurDLT; } } |

