[llvm-commits] [llvm] r109562 - /llvm/trunk/include/llvm/ADT/DenseSet.h
Bill Wendling
wendling at apple.com
Tue Jul 27 17:23:34 PDT 2010
On Jul 27, 2010, at 5:20 PM, Bill Wendling wrote:
> On Jul 27, 2010, at 4:55 PM, Owen Anderson wrote:
>
>> Author: resistor
>> Date: Tue Jul 27 18:55:47 2010
>> New Revision: 109562
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=109562&view=rev
>> Log:
>> Fill out the interface of DenseSet a bit.
>>
>> Modified:
>> llvm/trunk/include/llvm/ADT/DenseSet.h
>>
>> Modified: llvm/trunk/include/llvm/ADT/DenseSet.h
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=109562&r1=109561&r2=109562&view=diff
>> ==============================================================================
>> --- llvm/trunk/include/llvm/ADT/DenseSet.h (original)
>> +++ llvm/trunk/include/llvm/ADT/DenseSet.h Tue Jul 27 18:55:47 2010
>> @@ -58,6 +58,7 @@
>>
>> class Iterator {
>> typename MapTy::iterator I;
>> + friend class DenseSet;
>
> Why do you use "friend" here and in ConstIterator?
>
> -bw
>
>> public:
>> typedef typename MapTy::iterator::difference_type difference_type;
>> typedef ValueT value_type;
>> @@ -77,6 +78,7 @@
>>
>> class ConstIterator {
>> typename MapTy::const_iterator I;
>> + friend class DenseSet;
>> public:
>> typedef typename MapTy::const_iterator::difference_type difference_type;
>> typedef ValueT value_type;
>> @@ -103,6 +105,10 @@
>> const_iterator begin() const { return ConstIterator(TheMap.begin()); }
>> const_iterator end() const { return ConstIterator(TheMap.end()); }
>>
>> + iterator find(const ValueT &V) { return Iterator(TheMap.find(V)); }
>> + bool erase(Iterator I) { return TheMap.erase(I.I); }
>> + bool erase(ConstIterator CI) { return TheMap.erase(CI.I); }
>> +
I see. It's because of these. Never mind
-bw
>> std::pair<iterator, bool> insert(const ValueT &V) {
>> return TheMap.insert(std::make_pair(V, 0));
>> }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list