NFC: Add 'const' dereference method to OperandTypeIterator.
The deference provided by mapped_iterator is non-const. PiperOrigin-RevId: 271051375
This commit is contained in:
parent
c5284fe85e
commit
03db422359
|
@ -638,6 +638,9 @@ class OperandTypeIterator final
|
|||
public:
|
||||
using reference = Type;
|
||||
|
||||
/// Provide a const deference method.
|
||||
Type operator*() const { return unwrap(*I); }
|
||||
|
||||
/// Initializes the operand type iterator to the specified operand iterator.
|
||||
OperandTypeIterator(OperandIterator it)
|
||||
: llvm::mapped_iterator<OperandIterator, Type (*)(Value *)>(it, &unwrap) {
|
||||
|
|
Loading…
Reference in a new issue