[LLVMdev] DenseMap iterator constness fix

Victor Zverovich victor.zverovich at googlemail.com
Tue Nov 3 03:09:45 PST 2009


Dear all,

The first of the proposed patches (DenseMapIterator.patch) forbids implicit
conversion of DenseMap::const_iterator to DenseMap::iterator which was
possible because DenseMapIterator inherited (publicly) from
DenseMapConstIterator. Conversion the other way around is now allowed as one
may expect.
The template DenseMapConstIterator is removed and the template
parameter IsConst which specifies whether the iterator is constant is added
to DenseMapIterator.
Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be
addressed later.

The second patch (DenseMapIterator-clang.patch) corrects clang's usage of
DenseMap iterators.

Best regards,
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091103/51699ffd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DenseMapIterator.patch
Type: application/octet-stream
Size: 13668 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091103/51699ffd/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DenseMapIterator-clang.patch
Type: application/octet-stream
Size: 3323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091103/51699ffd/attachment-0001.obj>


More information about the llvm-dev mailing list