[PATCH] D92570: [clang] [Headers] Use the corresponding _aligned_free or __mingw_aligned_free in _mm_free
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 3 04:35:06 PST 2020
mstorsjo created this revision.
mstorsjo added reviewers: amccarth, rnk, chapuni.
Herald added a project: clang.
mstorsjo requested review of this revision.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92570
Files:
clang/lib/Headers/mm_malloc.h
Index: clang/lib/Headers/mm_malloc.h
===================================================================
--- clang/lib/Headers/mm_malloc.h
+++ clang/lib/Headers/mm_malloc.h
@@ -54,7 +54,13 @@
static __inline__ void __attribute__((__always_inline__, __nodebug__))
_mm_free(void *__p)
{
+#if defined(__MINGW32__)
+ __mingw_aligned_free(__p);
+#elif defined(_WIN32)
+ _aligned_free(__p);
+#else
free(__p);
+#endif
}
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92570.309228.patch
Type: text/x-patch
Size: 432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201203/b8544e6d/attachment.bin>
More information about the cfe-commits
mailing list