[llvm-commits] [llvm] r60134 - /llvm/trunk/include/llvm/ADT/StringMap.h

Ted Kremenek kremenek at apple.com
Wed Nov 26 16:17:25 PST 2008


Author: kremenek
Date: Wed Nov 26 18:17:25 2008
New Revision: 60134

URL: http://llvm.org/viewvc/llvm-project?rev=60134&view=rev
Log:
Add typedef to StringMapEntry.

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

Modified: llvm/trunk/include/llvm/ADT/StringMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringMap.h?rev=60134&r1=60133&r2=60134&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/StringMap.h (original)
+++ llvm/trunk/include/llvm/ADT/StringMap.h Wed Nov 26 18:17:25 2008
@@ -420,16 +420,18 @@
 protected:
   StringMapImpl::ItemBucket *Ptr;
 public:
+  typedef StringMapEntry<ValueTy> value_type;
+  
   explicit StringMapConstIterator(StringMapImpl::ItemBucket *Bucket,
                                   bool NoAdvance = false)
   : Ptr(Bucket) {
     if (!NoAdvance) AdvancePastEmptyBuckets();
   }
 
-  const StringMapEntry<ValueTy> &operator*() const {
+  const value_type &operator*() const {
     return *static_cast<StringMapEntry<ValueTy>*>(Ptr->Item);
   }
-  const StringMapEntry<ValueTy> *operator->() const {
+  const value_type *operator->() const {
     return static_cast<StringMapEntry<ValueTy>*>(Ptr->Item);
   }
 





More information about the llvm-commits mailing list