Reverting size_type for the containers from size_type to unsigned.

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
This commit is contained in:
Yaron Keren
2014-06-20 12:20:56 +00:00
parent 7d5bff0d5a
commit 212e2b9c8d
9 changed files with 9 additions and 9 deletions

View File

@ -73,7 +73,7 @@ protected:
~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; }