[llvm] ac2635e - Revert "[ADT] Fix SmallVector unused template instantiation on 32-bit systems."

Andrew Browne via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 16:41:36 PDT 2020


Author: Andrew Browne
Date: 2020-04-30T16:40:48-07:00
New Revision: ac2635e457d53b80b0a6f73a5041767197643aae

URL: https://github.com/llvm/llvm-project/commit/ac2635e457d53b80b0a6f73a5041767197643aae
DIFF: https://github.com/llvm/llvm-project/commit/ac2635e457d53b80b0a6f73a5041767197643aae.diff

LOG: Revert "[ADT] Fix SmallVector unused template instantiation on 32-bit systems."

This reverts commit 25e2e92297e21bb4e0acab1b6bb5b2fdd5dc49ad.

Buildbot failure.

Added: 
    

Modified: 
    llvm/lib/Support/SmallVector.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/SmallVector.cpp b/llvm/lib/Support/SmallVector.cpp
index 0c9ac83f300a..776b0981409f 100644
--- a/llvm/lib/Support/SmallVector.cpp
+++ b/llvm/lib/Support/SmallVector.cpp
@@ -78,18 +78,4 @@ 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


        


More information about the llvm-commits mailing list