[Openmp-commits] [openmp] [OMPT] Set default values for tsan function pointers (PR #93568)

via Openmp-commits openmp-commits at lists.llvm.org
Tue May 28 10:38:03 PDT 2024


================
@@ -146,18 +146,27 @@ void __attribute__((weak)) __tsan_flush_memory() {}
 static ArcherFlags *archer_flags;
 
 #ifndef TsanHappensBefore
+
+template <typename... Args> static void __tsan_func(Args...) {}
+
+#define DECLARE_TSAN_FUNCTION(name, ...)                                       \
+  static void (*name)(__VA_ARGS__) = __tsan_func<__VA_ARGS__>;
----------------
jprotze wrote:

```suggestion
template <typename... Args> static void __ompt_tsan_func(Args...) {}

#define DECLARE_TSAN_FUNCTION(name, ...)                                       \
  static void (*name)(__VA_ARGS__) = __ompt_tsan_func<__VA_ARGS__>;
```

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


More information about the Openmp-commits mailing list