]> granicus.if.org Git - llvm/commit
PDB HashTable: Make iterator key type const
authorNico Weber <nicolasweber@gmx.de>
Mon, 15 Jul 2019 12:10:02 +0000 (12:10 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 15 Jul 2019 12:10:02 +0000 (12:10 +0000)
commit303ca2d4a8680e0fe4ed84718920f6eaddf6224d
tree28f9753d08e6d113fb7855fb5842e628cf288292
parent70b7545abcf87d13445337540a6b4b3dae9a569c
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366060 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/PDB/Native/HashTable.h