[libc++abi] Don't try calling __libcpp_aligned_free when aligned allocation is disabled

See https://reviews.llvm.org/rGa78aaa1ad512#962077 for details.
This commit is contained in:
Louis Dionne 2020-12-01 17:43:33 -05:00
parent 8fee2ee9a6
commit d67e58f23a
1 changed files with 4 additions and 0 deletions

View File

@ -234,7 +234,11 @@ void __aligned_free_with_fallback(void* ptr) {
if (is_fallback_ptr(ptr))
fallback_free(ptr);
else {
#if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
::free(ptr);
#else
std::__libcpp_aligned_free(ptr);
#endif
}
}