[llvm-commits] [llvm] r58256 - /llvm/trunk/include/llvm/ADT/DenseMap.h

David Greene greened at obbligato.org
Mon Oct 27 11:15:25 PDT 2008


Author: greened
Date: Mon Oct 27 13:15:15 2008
New Revision: 58256

URL: http://llvm.org/viewvc/llvm-project?rev=58256&view=rev
Log:

Add STL-style typedefs and default constructors to make it possible to
use DenseMap in more contexts.

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

Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=58256&r1=58255&r2=58256&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Mon Oct 27 13:15:15 2008
@@ -105,6 +105,8 @@
   unsigned NumEntries;
   unsigned NumTombstones;
 public:
+  typedef KeyT key_type;
+  typedef ValueT mapped_type;
   typedef BucketT value_type;
   
   DenseMap(const DenseMap& other) {
@@ -452,6 +454,8 @@
 protected:
   const BucketT *Ptr, *End;
 public:
+  DenseMapIterator(void) : Ptr(0), End(0) {}
+
   DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) {
     AdvancePastEmptyBuckets();
   }
@@ -494,6 +498,7 @@
 template<typename KeyT, typename ValueT, typename KeyInfoT, typename ValueInfoT>
 class DenseMapConstIterator : public DenseMapIterator<KeyT, ValueT, KeyInfoT> {
 public:
+  DenseMapConstIterator(void) : DenseMapIterator<KeyT, ValueT, KeyInfoT>() {}
   DenseMapConstIterator(const std::pair<KeyT, ValueT> *Pos,
                         const std::pair<KeyT, ValueT> *E)
     : DenseMapIterator<KeyT, ValueT, KeyInfoT>(Pos, E) {





More information about the llvm-commits mailing list