Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2020-12-02 01:43:33 +0300
committerLouis Dionne <ldionne.2@gmail.com>2020-12-02 01:45:14 +0300
commitd67e58f23a8232ee17dba3cd8c5b4c1378ddbc59 (patch)
tree70f3f0e21f6299030d8aa7d8e203a7d26b6c294f /libcxxabi/src/fallback_malloc.cpp
parent8fee2ee9a689276eaea61d4c3f124aa80a81b6f7 (diff)
[libc++abi] Don't try calling __libcpp_aligned_free when aligned allocation is disabled
See https://reviews.llvm.org/rGa78aaa1ad512#962077 for details.
Diffstat (limited to 'libcxxabi/src/fallback_malloc.cpp')
-rw-r--r--libcxxabi/src/fallback_malloc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxxabi/src/fallback_malloc.cpp b/libcxxabi/src/fallback_malloc.cpp
index 78720187affc..f3d7937793ce 100644
--- a/libcxxabi/src/fallback_malloc.cpp
+++ b/libcxxabi/src/fallback_malloc.cpp
@@ -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
}
}