From d4c5f2a8dce8fe27336dde99f93f3d5a9ae2a696 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 13 Sep 2019 13:47:49 +0000 Subject: [PATCH] [ADT] Remove a workaround for old versions of clang git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371856 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/DenseMap.h | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 57b6b736f6a..948a6e6bfb3 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -38,33 +38,7 @@ namespace detail { // implementation without requiring two members. template struct DenseMapPair : public std::pair { - - // FIXME: Switch to inheriting constructors when we drop support for older - // clang versions. - // NOTE: This default constructor is declared with '{}' rather than - // '= default' to work around a separate bug in clang-3.8. This can - // also go when we switch to inheriting constructors. - DenseMapPair() {} - - DenseMapPair(const KeyT &Key, const ValueT &Value) - : std::pair(Key, Value) {} - - DenseMapPair(KeyT &&Key, ValueT &&Value) - : std::pair(std::move(Key), std::move(Value)) {} - - template - DenseMapPair(AltKeyT &&AltKey, AltValueT &&AltValue, - typename std::enable_if< - std::is_convertible::value && - std::is_convertible::value>::type * = 0) - : std::pair(std::forward(AltKey), - std::forward(AltValue)) {} - - template - DenseMapPair(AltPairT &&AltPair, - typename std::enable_if>::value>::type * = nullptr) - : std::pair(std::forward(AltPair)) {} + using std::pair::pair; KeyT &getFirst() { return std::pair::first; } const KeyT &getFirst() const { return std::pair::first; } -- 2.40.0