@@ -930,7 +930,7 @@ private:
930930 (void )__end;
931931 (void )__annotation_type;
932932 (void )__place;
933- # if _LIBCPP_HAS_ASAN
933+ # if __has_feature(address_sanitizer)
934934 // __beg - index of the first item to annotate
935935 // __end - index behind the last item to annotate (so last item + 1)
936936 // __annotation_type - __asan_unposion or __asan_poison
@@ -1023,23 +1023,23 @@ private:
10231023 std::__annotate_double_ended_contiguous_container<_Allocator>(
10241024 __mem_beg, __mem_end, __old_beg, __old_end, __new_beg, __new_end);
10251025 }
1026- # endif // _LIBCPP_HAS_ASAN
1026+ # endif // __has_feature(address_sanitizer)
10271027 }
10281028
10291029 _LIBCPP_HIDE_FROM_ABI void __annotate_new (size_type __current_size) const _NOEXCEPT {
10301030 (void )__current_size;
1031- # if _LIBCPP_HAS_ASAN
1031+ # if __has_feature(address_sanitizer)
10321032 if (__current_size == 0 )
10331033 __annotate_from_to (0 , __map_.size () * __block_size, __asan_poison, __asan_back_moved);
10341034 else {
10351035 __annotate_from_to (0 , __start_, __asan_poison, __asan_front_moved);
10361036 __annotate_from_to (__start_ + __current_size, __map_.size () * __block_size, __asan_poison, __asan_back_moved);
10371037 }
1038- # endif // _LIBCPP_HAS_ASAN
1038+ # endif // __has_feature(address_sanitizer)
10391039 }
10401040
10411041 _LIBCPP_HIDE_FROM_ABI void __annotate_delete () const _NOEXCEPT {
1042- # if _LIBCPP_HAS_ASAN
1042+ # if __has_feature(address_sanitizer)
10431043 if (empty ()) {
10441044 for (size_t __i = 0 ; __i < __map_.size (); ++__i) {
10451045 __annotate_whole_block (__i, __asan_unposion);
@@ -1048,35 +1048,35 @@ private:
10481048 __annotate_from_to (0 , __start_, __asan_unposion, __asan_front_moved);
10491049 __annotate_from_to (__start_ + size (), __map_.size () * __block_size, __asan_unposion, __asan_back_moved);
10501050 }
1051- # endif // _LIBCPP_HAS_ASAN
1051+ # endif // __has_feature(address_sanitizer)
10521052 }
10531053
10541054 _LIBCPP_HIDE_FROM_ABI void __annotate_increase_front (size_type __n) const _NOEXCEPT {
10551055 (void )__n;
1056- # if _LIBCPP_HAS_ASAN
1056+ # if __has_feature(address_sanitizer)
10571057 __annotate_from_to (__start_ - __n, __start_, __asan_unposion, __asan_front_moved);
10581058# endif
10591059 }
10601060
10611061 _LIBCPP_HIDE_FROM_ABI void __annotate_increase_back (size_type __n) const _NOEXCEPT {
10621062 (void )__n;
1063- # if _LIBCPP_HAS_ASAN
1063+ # if __has_feature(address_sanitizer)
10641064 __annotate_from_to (__start_ + size (), __start_ + size () + __n, __asan_unposion, __asan_back_moved);
10651065# endif
10661066 }
10671067
10681068 _LIBCPP_HIDE_FROM_ABI void __annotate_shrink_front (size_type __old_size, size_type __old_start) const _NOEXCEPT {
10691069 (void )__old_size;
10701070 (void )__old_start;
1071- # if _LIBCPP_HAS_ASAN
1071+ # if __has_feature(address_sanitizer)
10721072 __annotate_from_to (__old_start, __old_start + (__old_size - size ()), __asan_poison, __asan_front_moved);
10731073# endif
10741074 }
10751075
10761076 _LIBCPP_HIDE_FROM_ABI void __annotate_shrink_back (size_type __old_size, size_type __old_start) const _NOEXCEPT {
10771077 (void )__old_size;
10781078 (void )__old_start;
1079- # if _LIBCPP_HAS_ASAN
1079+ # if __has_feature(address_sanitizer)
10801080 __annotate_from_to (__old_start + size (), __old_start + __old_size, __asan_poison, __asan_back_moved);
10811081# endif
10821082 }
@@ -1089,7 +1089,7 @@ private:
10891089 __annotate_whole_block (size_t __block_index, __asan_annotation_type __annotation_type) const _NOEXCEPT {
10901090 (void )__block_index;
10911091 (void )__annotation_type;
1092- # if _LIBCPP_HAS_ASAN
1092+ # if __has_feature(address_sanitizer)
10931093 __map_const_iterator __block_it = __map_.begin () + __block_index;
10941094 const void * __block_start = std::__to_address (*__block_it);
10951095 const void * __block_end = std::__to_address (*__block_it + __block_size);
@@ -1102,7 +1102,7 @@ private:
11021102 }
11031103# endif
11041104 }
1105- # if _LIBCPP_HAS_ASAN
1105+ # if __has_feature(address_sanitizer)
11061106
11071107public:
11081108 _LIBCPP_HIDE_FROM_ABI bool __verify_asan_annotations () const _NOEXCEPT {
@@ -1164,7 +1164,7 @@ public:
11641164 }
11651165
11661166private:
1167- # endif // _LIBCPP_HAS_ASAN
1167+ # endif // __has_feature(address_sanitizer)
11681168 _LIBCPP_HIDE_FROM_ABI bool __maybe_remove_front_spare (bool __keep_one = true ) {
11691169 if (__front_spare_blocks () >= 2 || (!__keep_one && __front_spare_blocks ())) {
11701170 __annotate_whole_block (0 , __asan_unposion);
0 commit comments