diff options
| author | Serge Guelton <sguelton@quarkslab.com> | 2018-11-29 17:21:54 +0000 |
|---|---|---|
| committer | Serge Guelton <sguelton@quarkslab.com> | 2018-11-29 17:21:54 +0000 |
| commit | 644aa882359aa1f37bd6da2f258e867a00c7ad9e (patch) | |
| tree | 3f57be01a575cb4b7c73c5ac27a932e0008edaac | |
| parent | a7eb2c863fa9c55ee60f37a4ad6846cd2bbeec67 (diff) | |
| download | bcm5719-llvm-644aa882359aa1f37bd6da2f258e867a00c7ad9e.tar.gz bcm5719-llvm-644aa882359aa1f37bd6da2f258e867a00c7ad9e.zip | |
Avoid redundant reference to isPodLike in SmallVect/Optional implementation
NFC, preparatory work for isPodLike cleaning.
Differential Revision: https://reviews.llvm.org/D55005
llvm-svn: 347890
| -rw-r--r-- | llvm/include/llvm/ADT/Optional.h | 4 | ||||
| -rw-r--r-- | llvm/include/llvm/ADT/SmallVector.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h index 9fe9b2824ad..76937d632ae 100644 --- a/llvm/include/llvm/ADT/Optional.h +++ b/llvm/include/llvm/ADT/Optional.h @@ -29,7 +29,7 @@ namespace llvm { namespace optional_detail { /// Storage for any type. -template <typename T, bool IsPodLike> struct OptionalStorage { +template <typename T, bool = isPodLike<T>::value> struct OptionalStorage { AlignedCharArrayUnion<T> storage; bool hasVal = false; @@ -111,7 +111,7 @@ template <typename T, bool IsPodLike> struct OptionalStorage { } // namespace optional_detail template <typename T> class Optional { - optional_detail::OptionalStorage<T, isPodLike<T>::value> Storage; + optional_detail::OptionalStorage<T> Storage; public: using value_type = T; diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index e4ddd12afdf..0636abbb1fb 100644 --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/include/llvm/ADT/SmallVector.h @@ -182,7 +182,7 @@ public: /// SmallVectorTemplateBase<isPodLike = false> - This is where we put method /// implementations that are designed to work with non-POD-like T's. -template <typename T, bool isPodLike> +template <typename T, bool = isPodLike<T>::value> class SmallVectorTemplateBase : public SmallVectorTemplateCommon<T> { protected: SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon<T>(Size) {} @@ -320,8 +320,8 @@ public: /// This class consists of common code factored out of the SmallVector class to /// reduce code duplication based on the SmallVector 'N' template parameter. template <typename T> -class SmallVectorImpl : public SmallVectorTemplateBase<T, isPodLike<T>::value> { - using SuperClass = SmallVectorTemplateBase<T, isPodLike<T>::value>; +class SmallVectorImpl : public SmallVectorTemplateBase<T> { + using SuperClass = SmallVectorTemplateBase<T>; public: using iterator = typename SuperClass::iterator; |

