[NFC][hwasan] Check __GLIBCXX__ before checking _GLIBCXX_RELEASE in test

_GLIBCXX_RELEASE wasn't defined before GCC 7.1.

This is another follow-up to https://reviews.llvm.org/D119161
This commit is contained in:
Hans Wennborg 2022-03-01 09:36:14 +01:00
parent a29f8dbb7f
commit 3e6cfc631b

View File

@ -18,7 +18,9 @@ int main() {
assert(__sanitizer_get_allocated_size(a1) == 0);
delete[] a1;
#if defined(__cpp_aligned_new) && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 7)
#if defined(__cpp_aligned_new) && \
(!defined(__GLIBCXX__) || \
(defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7))
// Aligned new/delete
constexpr auto kAlign = std::align_val_t{8};
void *a2 = ::operator new(4, kAlign);