Shrink sizeof(SmallVector) by 8B on 64-bit platforms by representing size and capacity directly as unsigned and calculating end() from begin() + size().
This limits the maximum size/capacity of a vector to UINT32_MAX.
A few notes:
- I haven't profiled whether there is a compile-time hit, but I'm tempted to check the bots post-commit to check for regressions since this is no more branchy than before. Happy to be proactive if others think it's warranted.
- I noticed that SmallVectorImpl::resetToSmall, used by SmallVectorImpl::operator=(SmallVectorImpl &&), drops the small capacity to 0. This is a little sad so I left behind a FIXME.
- I lifted set_size() up to SmallVectorBase to use in place of setEnd().