[compiler-rt] Add aligned_alloc to macOS tsan interceptors (PR #79198)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 13:37:01 PST 2024


================
@@ -0,0 +1,61 @@
+// RUN: %clang_tsan -O1 %s -o %t -undefined dynamic_lookup
+// RUN: %deflake %run %t | FileCheck %s
+
+#include "test.h"
+
+#include <stdlib.h>
+
+#if defined(__cplusplus) && (__cplusplus >= 201703L)
+#  define HAVE_ALIGNED_ALLOC 1
+#endif
+
+#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) &&                  \
----------------
cjappl wrote:

I refactored such that we only define `HAVE_ALIGNED_ALLOC` one time with no conflicts. Let me know if that isn't what you intended! 

https://github.com/llvm/llvm-project/pull/79198


More information about the llvm-commits mailing list