Yaron Keren via llvm-dev
2016-Apr-28 12:43 UTC
[llvm-dev] Why duplicate "protected:" in SmallVector.h, StringMap.h?
In SmallVector.h: class SmallVectorBase { *protected:* void *BeginX, *EndX, *CapacityX; *protected:* SmallVectorBase(void *FirstEl, size_t Size) : BeginX(FirstEl), EndX(FirstEl), CapacityX((char*)FirstEl+Size) {} In StringMap.h: class StringMapImpl { *protected:* // Array of NumBuckets pointers to entries, null pointers are holes. // TheTable[NumBuckets] contains a sentinel value for easy iteration. Followed // by an array of the actual hash values as unsigned integers. StringMapEntryBase **TheTable; unsigned NumBuckets; unsigned NumItems; unsigned NumTombstones; unsigned ItemSize; *protected:* explicit StringMapImpl(unsigned itemSize) : TheTable(nullptr), is the second "protected:" a coding style that should be preserved? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160428/99c1ea48/attachment.html>
David Blaikie via llvm-dev
2016-Apr-28 18:46 UTC
[llvm-dev] Why duplicate "protected:" in SmallVector.h, StringMap.h?
Nope, don't believe it's any intentional coding style - I wouldn't worry about preserving them when making changes, but I probably wouldn't go out of my way to remove them all either. On Thu, Apr 28, 2016 at 5:43 AM, Yaron Keren via llvm-dev < llvm-dev at lists.llvm.org> wrote:> In SmallVector.h: > > class SmallVectorBase { > *protected:* > void *BeginX, *EndX, *CapacityX; > > *protected:* > SmallVectorBase(void *FirstEl, size_t Size) > : BeginX(FirstEl), EndX(FirstEl), CapacityX((char*)FirstEl+Size) {} > > > In StringMap.h: > > class StringMapImpl { > *protected:* > // Array of NumBuckets pointers to entries, null pointers are holes. > // TheTable[NumBuckets] contains a sentinel value for easy iteration. > Followed > // by an array of the actual hash values as unsigned integers. > StringMapEntryBase **TheTable; > unsigned NumBuckets; > unsigned NumItems; > unsigned NumTombstones; > unsigned ItemSize; > > *protected:* > explicit StringMapImpl(unsigned itemSize) > : TheTable(nullptr), > > is the second "protected:" a coding style that should be preserved? > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160428/b63f5ee1/attachment.html>
Yaron Keren via llvm-dev
2016-Apr-28 19:20 UTC
[llvm-dev] Why duplicate "protected:" in SmallVector.h, StringMap.h?
OK, thanks! 2016-04-28 21:46 GMT+03:00 David Blaikie <dblaikie at gmail.com>:> Nope, don't believe it's any intentional coding style - I wouldn't worry > about preserving them when making changes, but I probably wouldn't go out > of my way to remove them all either.On Thu, Apr 28, 2016 at 5:43 AM, Yaron Keren via llvm-dev < llvm-dev at lists.llvm.org> wrote:> In SmallVector.h: > > class SmallVectorBase { > *protected:* > void *BeginX, *EndX, *CapacityX; > > *protected:* > SmallVectorBase(void *FirstEl, size_t Size) > : BeginX(FirstEl), EndX(FirstEl), CapacityX((char*)FirstEl+Size) {} > > > In StringMap.h: > > class StringMapImpl { > *protected:* > // Array of NumBuckets pointers to entries, null pointers are holes. > // TheTable[NumBuckets] contains a sentinel value for easy iteration. > Followed > // by an array of the actual hash values as unsigned integers. > StringMapEntryBase **TheTable; > unsigned NumBuckets; > unsigned NumItems; > unsigned NumTombstones; > unsigned ItemSize; > > *protected:* > explicit StringMapImpl(unsigned itemSize) > : TheTable(nullptr), > > is the second "protected:" a coding style that should be preserved? > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160428/13caf2f5/attachment.html>
Maybe Matching Threads
- [LLVMdev] StringMap question
- [LLVMdev] Prevent unbounded memory consuption of long lived JIT processes
- RFC: Should SmallVectors be smaller?
- Unable to parse command line more than once using llvm libraries?
- [LLVMdev] SmallString + raw_svector_ostream combination should be more efficient