[llvm] r224619 - Update SmallPtrSet::insert's doc comment to match the new return type

David Blaikie dblaikie at gmail.com
Fri Dec 19 13:45:11 PST 2014


Author: dblaikie
Date: Fri Dec 19 15:45:11 2014
New Revision: 224619

URL: http://llvm.org/viewvc/llvm-project?rev=224619&view=rev
Log:
Update SmallPtrSet::insert's doc comment to match the new return type

Modified:
    llvm/trunk/include/llvm/ADT/SmallPtrSet.h

Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=224619&r1=224618&r2=224619&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Fri Dec 19 15:45:11 2014
@@ -257,8 +257,10 @@ public:
   typedef SmallPtrSetIterator<PtrType> iterator;
   typedef SmallPtrSetIterator<PtrType> const_iterator;
 
-  /// insert - This returns true if the pointer was new to the set, false if it
-  /// was already in the set.
+  /// Inserts Ptr if and only if there is no element in the container equal to
+  /// Ptr. The bool component of the returned pair is true if and only if the
+  /// insertion takes place, and the iterator component of the pair points to
+  /// the element equal to Ptr.
   std::pair<iterator, bool> insert(PtrType Ptr) {
     auto p = insert_imp(PtrTraits::getAsVoidPointer(Ptr));
     return std::make_pair(iterator(p.first, CurArray + CurArraySize), p.second);





More information about the llvm-commits mailing list