X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FSmallSet.h;h=75e8c64885a92754dbd5b6ac4e80f52145ec518f;hb=3a54b3dc87a581c203b18050b4f787b4ca28a12c;hp=30e8ee544fea3a6cb8c253ad0b126725f30f7df7;hpb=7235928b45e6a353f6fcca8b9a40e83ab3420fb0;p=oota-llvm.git diff --git a/include/llvm/ADT/SmallSet.h b/include/llvm/ADT/SmallSet.h index 30e8ee544fe..75e8c64885a 100644 --- a/include/llvm/ADT/SmallSet.h +++ b/include/llvm/ADT/SmallSet.h @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Chris Lattner and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -43,7 +43,7 @@ public: unsigned size() const { return isSmall() ? Vector.size() : Set.size(); } - + /// count - Return true if the element is in the set. bool count(const T &V) const { if (isSmall()) { @@ -53,12 +53,12 @@ public: return Set.count(V); } } - + /// insert - Insert an element into the set if it isn't already there. bool insert(const T &V) { if (!isSmall()) return Set.insert(V).second; - + VIterator I = vfind(V); if (I != Vector.end()) // Don't reinsert if it already exists. return false; @@ -75,7 +75,7 @@ public: Set.insert(V); return true; } - + bool erase(const T &V) { if (!isSmall()) return Set.erase(V); @@ -86,14 +86,14 @@ public: } return false; } - + void clear() { Vector.clear(); Set.clear(); } private: bool isSmall() const { return Set.empty(); } - + VIterator vfind(const T &V) const { for (VIterator I = Vector.begin(), E = Vector.end(); I != E; ++I) if (*I == V)