From 9f1f00ab1b347953da0efb0e20352be5e0709276 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 27 Nov 2008 00:17:25 +0000 Subject: [PATCH] Add typedef to StringMapEntry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60134 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/StringMap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h index 6675d04f8d0..d5acd223657 100644 --- a/include/llvm/ADT/StringMap.h +++ b/include/llvm/ADT/StringMap.h @@ -420,16 +420,18 @@ class StringMapConstIterator { protected: StringMapImpl::ItemBucket *Ptr; public: + typedef StringMapEntry value_type; + explicit StringMapConstIterator(StringMapImpl::ItemBucket *Bucket, bool NoAdvance = false) : Ptr(Bucket) { if (!NoAdvance) AdvancePastEmptyBuckets(); } - const StringMapEntry &operator*() const { + const value_type &operator*() const { return *static_cast*>(Ptr->Item); } - const StringMapEntry *operator->() const { + const value_type *operator->() const { return static_cast*>(Ptr->Item); } -- 2.34.1