The MachineBasicBlock::iterator is continuously changing during
generating the frame handling instructions. We should use the DebugLoc
from the caller, instead of getting it from the changing iterator.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Maybe you could pre-commit the test case to easier demonstrate the change of this patch?
Comment Actions
The test case will crash without this patch. The point is all the prologue instructions located in a basic block without other instructions at the end. As generating these prologue instructions, the iterator will be updated to the boundary of the basic block and it is invalid to use the iterator to access DebugLoc.
Comment Actions
LGTM but if this (also) fixes a crash I think the description could be updated to reflect that. I inferred from the description that this was just about improving the debug information.