mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
ARM/AArch64: Attach the FrameSetup MIFlag to CFI instructions.
Debug info marks the first instruction without the FrameSetup flag as being the end of the function prologue. Any CFI instructions in the middle of the function prologue would cause debug info to end the prologue too early and worse, attach the line number of the CFI instruction, which incidentally is often 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224294 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1117,8 +1117,12 @@ static DebugLoc findPrologueEndLoc(const MachineFunction *MF) {
|
||||
for (const auto &MBB : *MF)
|
||||
for (const auto &MI : MBB)
|
||||
if (!MI.isDebugValue() && !MI.getFlag(MachineInstr::FrameSetup) &&
|
||||
!MI.getDebugLoc().isUnknown())
|
||||
!MI.getDebugLoc().isUnknown()) {
|
||||
// Did the target forget to set the FrameSetup flag for CFI insns?
|
||||
assert(!MI.isCFIInstruction() &&
|
||||
"First non-frame-setup instruction is a CFI instruction.");
|
||||
return MI.getDebugLoc();
|
||||
}
|
||||
return DebugLoc();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user