aboutsummaryrefslogtreecommitdiff
path: root/source/10-common/SmallVector.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/10-common/SmallVector.hpp')
-rw-r--r--source/10-common/SmallVector.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/10-common/SmallVector.hpp b/source/10-common/SmallVector.hpp
index e33a25d..3fc7519 100644
--- a/source/10-common/SmallVector.hpp
+++ b/source/10-common/SmallVector.hpp
@@ -55,7 +55,7 @@ class iterator_range;
/// Using 64 bit size is desirable for cases like SmallVector<char>, where a
/// 32 bit size would limit the vector to ~4GB. SmallVectors are used for
/// buffering bitcode output - which can exceed 4GB.
-template <class Size_T>
+template <typename Size_T>
class SmallVectorBase {
protected:
void* BeginX;
@@ -97,12 +97,12 @@ protected:
}
};
-template <class T>
+template <typename T>
using SmallVectorSizeType =
typename std::conditional<sizeof(T) < 4 && sizeof(void*) >= 8, uint64_t, uint32_t>::type;
/// Figure out the offset of the first element.
-template <class T, typename = void>
+template <typename T, typename = void>
struct SmallVectorAlignmentAndSize {
alignas(SmallVectorBase<SmallVectorSizeType<T>>) char Base[sizeof(
SmallVectorBase<SmallVectorSizeType<T>>)];
@@ -222,7 +222,7 @@ protected:
/// Reserve enough space to add one element, and return the updated element
/// pointer in case it was a reference to the storage.
- template <class U>
+ template <typename U>
static const T* reserveForParamAndGetAddressImpl(U* This, const T& Elt, size_t N) {
size_t NewSize = This->size() + N;
if (LLVM_LIKELY(NewSize <= This->capacity()))
@@ -768,7 +768,7 @@ public:
}
private:
- template <class ArgType>
+ template <typename ArgType>
iterator insert_one_impl(iterator I, ArgType&& Elt) {
// Callers ensure that ArgType is derived from T.
static_assert(