[PATCH] D59938: [DebugInfo] Make InstrRange into a class, NFC
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 11:38:56 PDT 2019
aprantl added a comment.
LGTM with some small style nitpicks inline.
================
Comment at: include/llvm/CodeGen/DbgEntityHistoryCalculator.h:33
public:
- using InstrRange = std::pair<const MachineInstr *, const MachineInstr *>;
+ class InstrRange {
+ const MachineInstr *Begin;
----------------
class Doxygen comment please
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:50
auto &Ranges = VarInstrRanges[Var];
- if (!Ranges.empty() && Ranges.back().second == nullptr &&
- Ranges.back().first->isIdenticalTo(MI)) {
+ if (!Ranges.empty() && Ranges.back().getEnd() == nullptr &&
+ Ranges.back().getBegin()->isIdenticalTo(MI)) {
----------------
`!Ranges.back().getEnd()` or introduce a helper such as `Ranges.back().isOpen()`
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:80
const auto &Ranges = I->second;
- if (Ranges.empty() || Ranges.back().second != nullptr)
+ if (Ranges.empty() || Ranges.back().getEnd() != nullptr)
return 0;
----------------
ditto
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59938/new/
https://reviews.llvm.org/D59938
More information about the llvm-commits
mailing list