- Add some simple unittests for the findDebugLoc, rfindDebugLoc, findPrevDebugLoc and rfindPrevDebugLoc helpers in MachineBasicBlock.
- Make sure we do not crash in rfindDebugLoc when starting at instr_rend(). Solution is to see it as we start one MI before the first MI, so we can start searching forward at instr_begin() instead.
- Clean up code comments and code formatting related to the functions mentioned above.
This looks like unrelated reformatting? Could you remove changes like this from this patch?