[PATCH] D24883: [libc++] Fix typos causing compilation errors when _LIBCPP_DEBUG_LEVEL >= 2

Oleg Ranevskyy via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 13:45:24 PDT 2016


iid_iunknown created this revision.
iid_iunknown added a reviewer: EricWF.
iid_iunknown added a subscriber: llvm-commits.
iid_iunknown set the repository for this revision to rL LLVM.

This patch fixes a couple of typos that cause compilation errors when application includes <unordered_map> and enables the libc++'s debugging capabilities.

Repository:
  rL LLVM

https://reviews.llvm.org/D24883

Files:
  include/unordered_map

Index: include/unordered_map
===================================================================
--- include/unordered_map
+++ include/unordered_map
@@ -1012,7 +1012,7 @@
         iterator try_emplace(const_iterator __h, const key_type& __k, _Args&&... __args)
     {
 #if _LIBCPP_DEBUG_LEVEL >= 2
-        _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
+        _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
             "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
             " referring to this unordered_map");
 #endif
@@ -1024,7 +1024,7 @@
         iterator try_emplace(const_iterator __h, key_type&& __k, _Args&&... __args)
     {
 #if _LIBCPP_DEBUG_LEVEL >= 2
-        _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this,
+        _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__h) == this,
             "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
             " referring to this unordered_map");
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24883.72346.patch
Type: text/x-patch
Size: 1066 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160923/b55defc9/attachment.bin>


More information about the llvm-commits mailing list