[llvm] r276901 - Fix the build for libstdc++ 4.7

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 11:25:12 PDT 2016


Author: majnemer
Date: Wed Jul 27 13:25:12 2016
New Revision: 276901

URL: http://llvm.org/viewvc/llvm-project?rev=276901&view=rev
Log:
Fix the build for libstdc++ 4.7

libstdc++ 4.7 doesn't have emplace.  Use std::map::insert instead.

Modified:
    llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h

Modified: llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h?rev=276901&r1=276900&r2=276901&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h (original)
+++ llvm/trunk/include/llvm/Analysis/RegionInfoImpl.h Wed Jul 27 13:25:12 2016
@@ -329,10 +329,9 @@ typename Tr::RegionNodeT *RegionBase<Tr>
 
   if (at == BBNodeMap.end()) {
     auto Deconst = const_cast<RegionBase<Tr> *>(this);
-    at = BBNodeMap
-             .emplace(BB, make_unique<RegionNodeT>(
-                              static_cast<RegionT *>(Deconst), BB))
-             .first;
+    typename BBNodeMapT::value_type V = {
+        BB, make_unique<RegionNodeT>(static_cast<RegionT *>(Deconst), BB)};
+    at = BBNodeMap.insert(std::move(V)).first;
   }
   return at->second.get();
 }




More information about the llvm-commits mailing list