defusechain_iterator has an operator*() and operator->() that return
references to a MachineOperand, but its "reference" and "pointer"
typedefs are set as if the iterator returns a MachineInstr reference.
This causes compilation errors when defusechain_iterator is used in
generic code that uses the "reference" and "pointer" typedefs.
This patch fixes this by updating the typedefs to use MachineOperand
instead of MachineInstr.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/CodeGen/MachineRegisterInfo.h | ||
---|---|---|
974 | 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. |
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.