mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Revert "Revert "[ADT] Fix SmallVector unused template instantiation on 32-bit systems.""
This reverts commit ac2635e457d53b80b0a6f73a5041767197643aae. Revert was too hasty, build was already broken.
This commit is contained in:
parent
62091c8fcb
commit
0a7f127ff0
@ -78,4 +78,18 @@ void SmallVectorBase<Size_T>::grow_pod(void *FirstEl, size_t MinCapacity,
|
||||
}
|
||||
|
||||
template class llvm::SmallVectorBase<uint32_t>;
|
||||
|
||||
// Disable the uint64_t instantiation for 32-bit builds.
|
||||
// Both uint32_t and uint64_t instantations are needed for 64-bit builds.
|
||||
// This instantiation will never be used in 32-bit builds, and will cause
|
||||
// warnings when sizeof(Size_T) > sizeof(size_t).
|
||||
#if SIZE_MAX > UINT32_MAX
|
||||
template class llvm::SmallVectorBase<uint64_t>;
|
||||
|
||||
// Assertions to ensure this #if stays in sync with SmallVectorSizeType.
|
||||
static_assert(sizeof(SmallVectorSizeType<char>) == sizeof(uint64_t),
|
||||
"Expected SmallVectorBase<uint64_t> variant to be in use.");
|
||||
#else
|
||||
static_assert(sizeof(SmallVectorSizeType<char>) == sizeof(uint32_t),
|
||||
"Expected SmallVectorBase<uint32_t> variant to be in use.");
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user