HomePhabricator

PDB HashTable: Make iterator key type const

Description

PDB HashTable: Make iterator key type const

Having the hash table key change during iteration is bad, so make it
impossible. Nothing relied on the key type not being const.

(This is also necessary to be able to call the const version of
iterator_facade_base::operator->(). Nothing calls this, and nothing
will, but I tried using it locally during development and it took me a
while to understand what was going wrong.)

Also rename the iterator typedef to const_iterator.

No behavior change.

Differential Revision: https://reviews.llvm.org/D64641

Details

Committed
nicoJul 15 2019, 5:10 AM
Differential Revision
D64641: PDB HashTable: Make iterator type const
Parents
rL366059: [OpenCL][PR41727] Prevent ICE on global dtors
Branches
Unknown
Tags
Unknown