summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2013-04-05 17:58:52 +0000
committerHoward Hinnant <hhinnant@apple.com>2013-04-05 17:58:52 +0000
commitf750923161ae433275798f45ff277add0f0703ce (patch)
tree2ab26183b9df75c14ad6d7f77bb6c3b1d086d3ff /libcxx/src
parent10ad081fc67c027d54fcd3133697eb0f2d0dfe00 (diff)
downloadbcm5719-llvm-f750923161ae433275798f45ff277add0f0703ce.tar.gz
bcm5719-llvm-f750923161ae433275798f45ff277add0f0703ce.zip
Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
llvm-svn: 178892
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/debug.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libcxx/src/debug.cpp b/libcxx/src/debug.cpp
index 2d4b094baac..06040af902a 100644
--- a/libcxx/src/debug.cpp
+++ b/libcxx/src/debug.cpp
@@ -110,8 +110,7 @@ __libcpp_db::__find_c_from_i(void* __i) const
{
RLock _(mut());
__i_node* i = __find_iterator(__i);
- _LIBCPP_ASSERT(i != nullptr, "iterator constructed in translation unit with debug mode not enabled."
- " #define _LIBCPP_DEBUG2 1 for that translation unit.");
+ _LIBCPP_ASSERT(i != nullptr, "iterator not found in debug database.");
return i->__c_ != nullptr ? i->__c_->__c_ : nullptr;
}
@@ -302,7 +301,7 @@ __libcpp_db::__iterator_copy(void* __i, const void* __i0)
__i_node* i = __find_iterator(__i);
__i_node* i0 = __find_iterator(__i0);
__c_node* c0 = i0 != nullptr ? i0->__c_ : nullptr;
- if (i == nullptr && c0 != nullptr)
+ if (i == nullptr && i0 != nullptr)
i = __insert_iterator(__i);
__c_node* c = i != nullptr ? i->__c_ : nullptr;
if (c != c0)
OpenPOWER on IntegriCloud