forked from OSchip/llvm-project
Use size_t for tuple type size
This is more consistent with standard containers. -- PiperOrigin-RevId: 250985851
This commit is contained in:
parent
daefaded4a
commit
8c4ae76b27
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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(); }
|
||||
|
|
Loading…
Reference in New Issue