aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-10-06 03:04:58 +0000
committerDevang Patel <dpatel@apple.com>2009-10-06 03:04:58 +0000
commit02c04237d01ffe7170be746ceed5f10487e0ca0c (patch)
treee72acd837a68647074ee967174622bb2f32a3c7a /lib/ExecutionEngine
parentaf0e2726835e096e32c30c1b88cc7a6232a6ef69 (diff)
downloadexternal_llvm-02c04237d01ffe7170be746ceed5f10487e0ca0c.zip
external_llvm-02c04237d01ffe7170be746ceed5f10487e0ca0c.tar.gz
external_llvm-02c04237d01ffe7170be746ceed5f10487e0ca0c.tar.bz2
Update processDebugLoc() to handle requests to process debug info, before and after emitting instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 8548356..e8314a1 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/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;
}
}