[llvm-dev] Why duplicate "protected:" in SmallVector.h, StringMap.h?

Yaron Keren via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 28 05:43:04 PDT 2016

In SmallVector.h:

class SmallVectorBase {
  void *BeginX, *EndX, *CapacityX;

  SmallVectorBase(void *FirstEl, size_t Size)
    : BeginX(FirstEl), EndX(FirstEl), CapacityX((char*)FirstEl+Size) {}

In StringMap.h:

class StringMapImpl {
  // Array of NumBuckets pointers to entries, null pointers are holes.
  // TheTable[NumBuckets] contains a sentinel value for easy iteration.
  // by an array of the actual hash values as unsigned integers.
  StringMapEntryBase **TheTable;
  unsigned NumBuckets;
  unsigned NumItems;
  unsigned NumTombstones;
  unsigned ItemSize;

  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>

More information about the llvm-dev mailing list