[llvm-branch-commits] [libcxx] dd88bd2 - Revert "[ASan][libc++] String annotations optimizations fix with lambda (#76200)"
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jan 8 15:34:29 PST 2024
Author: Tacet
Date: 2024-01-09T00:34:25+01:00
New Revision: dd88bd27b380e4b5ffd7260a29ec57d6093a70dd
URL: https://github.com/llvm/llvm-project/commit/dd88bd27b380e4b5ffd7260a29ec57d6093a70dd
DIFF: https://github.com/llvm/llvm-project/commit/dd88bd27b380e4b5ffd7260a29ec57d6093a70dd.diff
LOG: Revert "[ASan][libc++] String annotations optimizations fix with lambda (#76200)"
This reverts commit c68a9d25e99a096f6862fc4b57dd380a21245d31.
Added:
Modified:
libcxx/include/string
Removed:
################################################################################
diff --git a/libcxx/include/string b/libcxx/include/string
index e2be53eaee2417..c676182fba8bac 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -922,7 +922,7 @@ public:
// Turning off ASan instrumentation for variable initialization with _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
// does not work consistently during initialization of __r_, so we instead unpoison __str's memory manually first.
// __str's memory needs to be unpoisoned only in the case where it's a short string.
- : __r_([](basic_string &__s){ if(!__s.__is_long()) __s.__annotate_delete(); return std::move(__s.__r_); }(__str)) {
+ : __r_(((__str.__is_long() ? 0 : (__str.__annotate_delete(), 0)), std::move(__str.__r_))) {
__str.__r_.first() = __rep();
__str.__annotate_new(0);
if (!__is_long())
More information about the llvm-branch-commits
mailing list