mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
DwarfDebug: Avoid creating new DebugLocs in the backend
Don't use `DebugLoc::getFnDebugLoc()`, which creates new `MDLocation`s, in the backend. We just want to grab the subprogram here anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233601 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1168,13 +1168,11 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
||||
|
||||
// Record beginning of function.
|
||||
PrologEndLoc = findPrologueEndLoc(MF);
|
||||
if (PrologEndLoc) {
|
||||
DebugLoc FnStartDL = PrologEndLoc.getFnDebugLoc();
|
||||
|
||||
if (MDLocation *L = PrologEndLoc) {
|
||||
// We'd like to list the prologue as "not statements" but GDB behaves
|
||||
// poorly if we do that. Revisit this with caution/GDB (7.5+) testing.
|
||||
recordSourceLine(FnStartDL.getLine(), FnStartDL.getCol(),
|
||||
FnStartDL.getScope(), DWARF2_FLAG_IS_STMT);
|
||||
auto *SP = L->getInlinedAtScope()->getSubprogram();
|
||||
recordSourceLine(SP->getScopeLine(), 0, SP, DWARF2_FLAG_IS_STMT);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user