From 644aa882359aa1f37bd6da2f258e867a00c7ad9e Mon Sep 17 00:00:00 2001 From: Serge Guelton Date: Thu, 29 Nov 2018 17:21:54 +0000 Subject: [PATCH] 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 --- llvm/include/llvm/ADT/Optional.h | 4 ++-- 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 9fe9b2824ad6..76937d632ae1 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 struct OptionalStorage { +template ::value> struct OptionalStorage { AlignedCharArrayUnion storage; bool hasVal = false; @@ -111,7 +111,7 @@ template struct OptionalStorage { } // namespace optional_detail template class Optional { - optional_detail::OptionalStorage::value> Storage; + optional_detail::OptionalStorage Storage; public: using value_type = T; diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h index e4ddd12afdf4..0636abbb1fbf 100644 --- a/llvm/include/llvm/ADT/SmallVector.h +++ b/llvm/include/llvm/ADT/SmallVector.h @@ -182,7 +182,7 @@ public: /// SmallVectorTemplateBase - This is where we put method /// implementations that are designed to work with non-POD-like T's. -template +template ::value> class SmallVectorTemplateBase : public SmallVectorTemplateCommon { protected: SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon(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 -class SmallVectorImpl : public SmallVectorTemplateBase::value> { - using SuperClass = SmallVectorTemplateBase::value>; +class SmallVectorImpl : public SmallVectorTemplateBase { + using SuperClass = SmallVectorTemplateBase; public: using iterator = typename SuperClass::iterator;