[PATCH] D97522: Fix the value_type of defusechain_iterator to match its operator*()

Nicolas Guillemot via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 19:09:25 PST 2021


nlguillemot added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineRegisterInfo.h:974
   class defusechain_iterator
     : public std::iterator<std::forward_iterator_tag, MachineInstr, ptrdiff_t> {
     friend class MachineRegisterInfo;
----------------
There's another use here that needs to be updated.

By the way, I think this bug was introduced because `defusechain_instr_iterator` was copy/pasted make `defusechain_iterator`. Then maybe nobody ever tried to run a std algorithm with this iterator in a way that requires the typedefs to be correct.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97522/new/

https://reviews.llvm.org/D97522



More information about the llvm-commits mailing list