mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
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
This commit is contained in:
parent
af0e272683
commit
02c04237d0
@ -597,7 +597,7 @@ namespace {
|
|||||||
/// MachineRelocations that reference external functions by name.
|
/// MachineRelocations that reference external functions by name.
|
||||||
const StringMap<void*> &getExternalFnStubs() const { return ExtFnStubs; }
|
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) {
|
virtual void emitLabel(uint64_t LabelID) {
|
||||||
if (LabelLocations.size() <= LabelID)
|
if (LabelLocations.size() <= LabelID)
|
||||||
@ -708,10 +708,11 @@ void JITEmitter::AddStubToCurrentFunction(void *StubAddr) {
|
|||||||
FnRefs.insert(CurFn);
|
FnRefs.insert(CurFn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JITEmitter::processDebugLoc(DebugLoc DL) {
|
void JITEmitter::processDebugLoc(DebugLoc DL, bool BeforePrintingInsn) {
|
||||||
if (!DL.isUnknown()) {
|
if (!DL.isUnknown()) {
|
||||||
DebugLocTuple CurDLT = EmissionDetails.MF->getDebugLocTuple(DL);
|
DebugLocTuple CurDLT = EmissionDetails.MF->getDebugLocTuple(DL);
|
||||||
|
|
||||||
|
if (BeforePrintingInsn) {
|
||||||
if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) {
|
if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) {
|
||||||
JITEvent_EmittedFunctionDetails::LineStart NextLine;
|
JITEvent_EmittedFunctionDetails::LineStart NextLine;
|
||||||
NextLine.Address = getCurrentPCValue();
|
NextLine.Address = getCurrentPCValue();
|
||||||
@ -722,6 +723,7 @@ void JITEmitter::processDebugLoc(DebugLoc DL) {
|
|||||||
PrevDLT = CurDLT;
|
PrevDLT = CurDLT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static unsigned GetConstantPoolSizeInBytes(MachineConstantPool *MCP,
|
static unsigned GetConstantPoolSizeInBytes(MachineConstantPool *MCP,
|
||||||
const TargetData *TD) {
|
const TargetData *TD) {
|
||||||
|
Loading…
Reference in New Issue
Block a user