Use size_t for tuple type size

This is more consistent with standard containers.

--

PiperOrigin-RevId: 250985851
This commit is contained in:
Geoffrey Martin-Noble 2019-05-31 17:19:24 -07:00 committed by Mehdi Amini
parent daefaded4a
commit 8c4ae76b27
2 changed files with 3 additions and 3 deletions

View File

@ -477,7 +477,7 @@ public:
void getFlattenedTypes(SmallVectorImpl<Type> &types);
/// Return the number of held types.
unsigned size() const;
size_t size() const;
/// Iterate over the held elements.
using iterator = ArrayRef<Type>::iterator;
@ -485,7 +485,7 @@ public:
iterator end() const { return getTypes().end(); }
/// Return the element type at index 'index'.
Type getType(unsigned index) const {
Type getType(size_t index) const {
assert(index < size() && "invalid index for tuple type");
return getTypes()[index];
}

View File

@ -404,4 +404,4 @@ void TupleType::getFlattenedTypes(SmallVectorImpl<Type> &types) {
}
/// Return the number of element types.
unsigned TupleType::size() const { return getImpl()->size(); }
size_t TupleType::size() const { return getImpl()->size(); }