Reapply "ADT: Shrink size of SmallVector by 8B on 64-bit platforms"
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Jul 2018 00:44:58 +0000 (00:44 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Jul 2018 00:44:58 +0000 (00:44 +0000)
commitc03b04d53305de01ee28ffe80be17cfaeca24cec
tree0ffbb05d8d12aa450b8435fabf98f79a72ca80ca
parentcaefe42c66ae8e67c8bd6ac2502e85f13cae38bf
Reapply "ADT: Shrink size of SmallVector by 8B on 64-bit platforms"

I'm optimistically reverting commit r337511, effectively reapplying
r337504 *without* changes.

The failing bots that had `SmallVector` in the backtrace recovered after
the unrelated commit r337508.  The backtraces looked bogus anyway, with
`SmallVector::size()` calling (e.g.) `ConstantArray::get()`.

Here's the original commit message:

    ADT: Shrink size of SmallVector by 8B on 64-bit platforms

    Represent size and capacity directly as unsigned and calculate
    `end()` using `begin() + size()`.

    This limits the maximum size/capacity of a vector to UINT32_MAX.

    https://reviews.llvm.org/D48518

llvm-svn: 337514
llvm/include/llvm/ADT/SmallVector.h
llvm/lib/Support/SmallVector.cpp