@@ -930,7 +930,7 @@ private:
930
930
(void )__end;
931
931
(void )__annotation_type;
932
932
(void )__place;
933
- # if _LIBCPP_HAS_ASAN
933
+ # if __has_feature(address_sanitizer)
934
934
// __beg - index of the first item to annotate
935
935
// __end - index behind the last item to annotate (so last item + 1)
936
936
// __annotation_type - __asan_unposion or __asan_poison
@@ -1023,23 +1023,23 @@ private:
1023
1023
std::__annotate_double_ended_contiguous_container<_Allocator>(
1024
1024
__mem_beg, __mem_end, __old_beg, __old_end, __new_beg, __new_end);
1025
1025
}
1026
- # endif // _LIBCPP_HAS_ASAN
1026
+ # endif // __has_feature(address_sanitizer)
1027
1027
}
1028
1028
1029
1029
_LIBCPP_HIDE_FROM_ABI void __annotate_new (size_type __current_size) const _NOEXCEPT {
1030
1030
(void )__current_size;
1031
- # if _LIBCPP_HAS_ASAN
1031
+ # if __has_feature(address_sanitizer)
1032
1032
if (__current_size == 0 )
1033
1033
__annotate_from_to (0 , __map_.size () * __block_size, __asan_poison, __asan_back_moved);
1034
1034
else {
1035
1035
__annotate_from_to (0 , __start_, __asan_poison, __asan_front_moved);
1036
1036
__annotate_from_to (__start_ + __current_size, __map_.size () * __block_size, __asan_poison, __asan_back_moved);
1037
1037
}
1038
- # endif // _LIBCPP_HAS_ASAN
1038
+ # endif // __has_feature(address_sanitizer)
1039
1039
}
1040
1040
1041
1041
_LIBCPP_HIDE_FROM_ABI void __annotate_delete () const _NOEXCEPT {
1042
- # if _LIBCPP_HAS_ASAN
1042
+ # if __has_feature(address_sanitizer)
1043
1043
if (empty ()) {
1044
1044
for (size_t __i = 0 ; __i < __map_.size (); ++__i) {
1045
1045
__annotate_whole_block (__i, __asan_unposion);
@@ -1048,35 +1048,35 @@ private:
1048
1048
__annotate_from_to (0 , __start_, __asan_unposion, __asan_front_moved);
1049
1049
__annotate_from_to (__start_ + size (), __map_.size () * __block_size, __asan_unposion, __asan_back_moved);
1050
1050
}
1051
- # endif // _LIBCPP_HAS_ASAN
1051
+ # endif // __has_feature(address_sanitizer)
1052
1052
}
1053
1053
1054
1054
_LIBCPP_HIDE_FROM_ABI void __annotate_increase_front (size_type __n) const _NOEXCEPT {
1055
1055
(void )__n;
1056
- # if _LIBCPP_HAS_ASAN
1056
+ # if __has_feature(address_sanitizer)
1057
1057
__annotate_from_to (__start_ - __n, __start_, __asan_unposion, __asan_front_moved);
1058
1058
# endif
1059
1059
}
1060
1060
1061
1061
_LIBCPP_HIDE_FROM_ABI void __annotate_increase_back (size_type __n) const _NOEXCEPT {
1062
1062
(void )__n;
1063
- # if _LIBCPP_HAS_ASAN
1063
+ # if __has_feature(address_sanitizer)
1064
1064
__annotate_from_to (__start_ + size (), __start_ + size () + __n, __asan_unposion, __asan_back_moved);
1065
1065
# endif
1066
1066
}
1067
1067
1068
1068
_LIBCPP_HIDE_FROM_ABI void __annotate_shrink_front (size_type __old_size, size_type __old_start) const _NOEXCEPT {
1069
1069
(void )__old_size;
1070
1070
(void )__old_start;
1071
- # if _LIBCPP_HAS_ASAN
1071
+ # if __has_feature(address_sanitizer)
1072
1072
__annotate_from_to (__old_start, __old_start + (__old_size - size ()), __asan_poison, __asan_front_moved);
1073
1073
# endif
1074
1074
}
1075
1075
1076
1076
_LIBCPP_HIDE_FROM_ABI void __annotate_shrink_back (size_type __old_size, size_type __old_start) const _NOEXCEPT {
1077
1077
(void )__old_size;
1078
1078
(void )__old_start;
1079
- # if _LIBCPP_HAS_ASAN
1079
+ # if __has_feature(address_sanitizer)
1080
1080
__annotate_from_to (__old_start + size (), __old_start + __old_size, __asan_poison, __asan_back_moved);
1081
1081
# endif
1082
1082
}
@@ -1089,7 +1089,7 @@ private:
1089
1089
__annotate_whole_block (size_t __block_index, __asan_annotation_type __annotation_type) const _NOEXCEPT {
1090
1090
(void )__block_index;
1091
1091
(void )__annotation_type;
1092
- # if _LIBCPP_HAS_ASAN
1092
+ # if __has_feature(address_sanitizer)
1093
1093
__map_const_iterator __block_it = __map_.begin () + __block_index;
1094
1094
const void * __block_start = std::__to_address (*__block_it);
1095
1095
const void * __block_end = std::__to_address (*__block_it + __block_size);
@@ -1102,7 +1102,7 @@ private:
1102
1102
}
1103
1103
# endif
1104
1104
}
1105
- # if _LIBCPP_HAS_ASAN
1105
+ # if __has_feature(address_sanitizer)
1106
1106
1107
1107
public:
1108
1108
_LIBCPP_HIDE_FROM_ABI bool __verify_asan_annotations () const _NOEXCEPT {
@@ -1164,7 +1164,7 @@ public:
1164
1164
}
1165
1165
1166
1166
private:
1167
- # endif // _LIBCPP_HAS_ASAN
1167
+ # endif // __has_feature(address_sanitizer)
1168
1168
_LIBCPP_HIDE_FROM_ABI bool __maybe_remove_front_spare (bool __keep_one = true ) {
1169
1169
if (__front_spare_blocks () >= 2 || (!__keep_one && __front_spare_blocks ())) {
1170
1170
__annotate_whole_block (0 , __asan_unposion);
0 commit comments