summaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/SmallVector.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/SmallVector.h')
-rw-r--r--include/llvm/ADT/SmallVector.h26
1 files changed, 10 insertions, 16 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index fec6bcd..8b0a13d 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -20,6 +20,7 @@
#include <cstddef>
#include <cstdlib>
#include <cstring>
+#include <iterator>
#include <memory>
#ifdef _MSC_VER
@@ -57,19 +58,13 @@ protected:
// Allocate raw space for N elements of type T. If T has a ctor or dtor, we
// don't want it to be automatically run, so we need to represent the space as
// something else. An array of char would work great, but might not be
- // aligned sufficiently. Instead, we either use GCC extensions, or some
- // number of union instances for the space, which guarantee maximal alignment.
- struct U {
-#ifdef __GNUC__
- char X __attribute__((aligned));
-#else
- union {
- double D;
- long double LD;
- long long L;
- void *P;
- } X;
-#endif
+ // aligned sufficiently. Instead we use some number of union instances for
+ // the space, which guarantee maximal alignment.
+ union U {
+ double D;
+ long double LD;
+ long long L;
+ void *P;
} FirstEl;
// Space after 'FirstEl' is clobbered, do not add any instance vars after it.
@@ -94,7 +89,7 @@ protected:
}
/// grow_pod - This is an implementation of the grow() method which only works
- /// on POD-like datatypes and is out of line to reduce code duplication.
+ /// on POD-like data types and is out of line to reduce code duplication.
void grow_pod(size_t MinSizeInBytes, size_t TSize);
public:
@@ -269,7 +264,7 @@ public:
template <typename T>
class SmallVectorImpl : public SmallVectorTemplateBase<T, isPodLike<T>::value> {
typedef SmallVectorTemplateBase<T, isPodLike<T>::value > SuperClass;
-
+
SmallVectorImpl(const SmallVectorImpl&); // DISABLED.
public:
typedef typename SuperClass::iterator iterator;
@@ -346,7 +341,6 @@ public:
return Result;
}
-
void swap(SmallVectorImpl &RHS);
/// append - Add the specified range to the end of the SmallVector.
OpenPOWER on IntegriCloud