diff options
author | Vedant Kumar <vsk@apple.com> | 2020-04-15 17:54:39 -0700 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2020-04-22 17:03:39 -0700 |
commit | 10ce1bc8d02738c20a7e6c49f51b28a26d93927f (patch) | |
tree | 7cb4e52b9282d0b197aee5824de2436b7baa692a /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | 6b58018c05f0aa6e8c648aef652fbf25793b9e3d (diff) | |
download | llvm-10ce1bc8d02738c20a7e6c49f51b28a26d93927f.zip llvm-10ce1bc8d02738c20a7e6c49f51b28a26d93927f.tar.gz llvm-10ce1bc8d02738c20a7e6c49f51b28a26d93927f.tar.bz2 |
[MachineBasicBlock] Add helpers for skipping debug instructions [1/14]
Summary:
These helpers are exercised by follow-up commits in this patch series,
which is all about removing CodeGen differences with vs. without debug
info in the AArch64 backend.
Reviewers: fhahn, aprantl, jpaquette, paquette
Subscribers: kristof.beyls, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78260
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 5f46086..57dd8d3 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -1329,8 +1329,8 @@ MachineBasicBlock::findDebugLoc(instr_iterator MBBI) { /// instructions. Return UnknownLoc if there is none. DebugLoc MachineBasicBlock::findPrevDebugLoc(instr_iterator MBBI) { if (MBBI == instr_begin()) return {}; - // Skip debug declarations, we don't want a DebugLoc from them. - MBBI = skipDebugInstructionsBackward(std::prev(MBBI), instr_begin()); + // Skip debug instructions, we don't want a DebugLoc from them. + MBBI = prev_nodbg(MBBI, instr_begin()); if (!MBBI->isDebugInstr()) return MBBI->getDebugLoc(); return {}; } |