[PATCH] D23956: Fix DensetSet::insert_as() for MSVC2015 (NFC)

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 20:11:48 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL280685: Fix DensetSet::insert_as() for MSVC2015  (NFC) (authored by mehdi_amini).

Changed prior to commit:
  https://reviews.llvm.org/D23956?vs=69472&id=70352#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23956

Files:
  llvm/trunk/include/llvm/ADT/DenseSet.h

Index: llvm/trunk/include/llvm/ADT/DenseSet.h
===================================================================
--- llvm/trunk/include/llvm/ADT/DenseSet.h
+++ llvm/trunk/include/llvm/ADT/DenseSet.h
@@ -168,12 +168,11 @@
   template <typename LookupKeyT>
   std::pair<iterator, bool> insert_as(const ValueT &V,
                                       const LookupKeyT &LookupKey) {
-    return insert_as(ValueT(V), LookupKey);
+    return TheMap.insert_as({V, detail::DenseSetEmpty()}, LookupKey);
   }
   template <typename LookupKeyT>
   std::pair<iterator, bool> insert_as(ValueT &&V, const LookupKeyT &LookupKey) {
-    detail::DenseSetEmpty Empty;
-    return TheMap.insert_as(std::make_pair(std::move(V), Empty), LookupKey);
+    return TheMap.insert_as({std::move(V), detail::DenseSetEmpty()}, LookupKey);
   }
 
   // Range insertion of values.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23956.70352.patch
Type: text/x-patch
Size: 853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160906/456ae9bd/attachment.bin>


More information about the llvm-commits mailing list