Various places in LLVM assume that container size and count are unsigned
and do not use the container size_type. Therefore they break compilation
(or possibly executation) for LP64 systems where size_t is 64 bit while
unsigned is still 32 bit.
If we'll ever that many items in the container size_type could be made
size_t for a specific containers after reviweing its other uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211353
91177308-0d34-0410-b5e6-
96231b3b80d8
typedef std::pair<KeyT, ValueT> BucketT;
public:
- typedef size_t size_type;
+ typedef unsigned size_type;
typedef KeyT key_type;
typedef ValueT mapped_type;
typedef BucketT value_type;
public:
typedef ValueT key_type;
typedef ValueT value_type;
- typedef size_t size_type;\r
+ typedef unsigned size_type;\r
explicit DenseSet(unsigned NumInitBuckets = 0) : TheMap(NumInitBuckets) {}
/// ScopeTy - This is a helpful typedef that allows clients to get easy access
/// to the name of the scope for this hash table.
typedef ScopedHashTableScope<K, V, KInfo, AllocatorTy> ScopeTy;
- typedef size_t size_type;\r
+ typedef unsigned size_type;\r
private:
typedef ScopedHashTableVal<K, V> ValTy;
DenseMap<K, ValTy*, KInfo> TopLevelMap;
};
public:
- typedef size_t size_type;\r
+ typedef unsigned size_type;\r
// Encapsulation of a single bit.
class reference {
SmallBitVector &TheVector;
~SmallPtrSetImplBase();
public:
- typedef size_t size_type;
+ typedef unsigned size_type;
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { return size() == 0; }
size_type size() const { return NumElements; }
: public ilist_node<SparseBitVectorElement<ElementSize> > {
public:
typedef unsigned long BitWord;
- typedef size_t size_type;\r
+ typedef unsigned size_type;\r
enum {
BITWORD_SIZE = sizeof(BitWord) * CHAR_BIT,
BITWORDS_PER_ELEMENT = (ElementSize + BITWORD_SIZE - 1) / BITWORD_SIZE,
typedef const ValueT &const_reference;
typedef ValueT *pointer;
typedef const ValueT *const_pointer;
- typedef size_t size_type;\r
+ typedef unsigned size_type;\r
SparseMultiSet()
: Sparse(nullptr), Universe(0), FreelistIdx(SMSNode::INVALID), NumFree(0) {}
typedef typename KeyFunctorT::argument_type KeyT;
typedef SmallVector<ValueT, 8> DenseT;
- typedef size_t size_type;\r
+ typedef unsigned size_type;\r
DenseT Dense;
SparseT *Sparse;
unsigned Universe;
typedef KeyT key_type;
typedef ValueT mapped_type;
typedef std::pair<KeyT, ValueT> value_type;
- typedef size_t size_type;
+ typedef unsigned size_type;
explicit ValueMap(unsigned NumInitBuckets = 64)
: Map(NumInitBuckets), Data() {}