[compiler-rt] 919a3f1 - Add declaration for `__tsan_default_options` to tsan_interface.h
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 15:03:29 PDT 2023
Author: Dave MacLachlan
Date: 2023-03-20T15:02:57-07:00
New Revision: 919a3f1c751bf27c3c28018d8ff6cb55a81a5164
URL: https://github.com/llvm/llvm-project/commit/919a3f1c751bf27c3c28018d8ff6cb55a81a5164
DIFF: https://github.com/llvm/llvm-project/commit/919a3f1c751bf27c3c28018d8ff6cb55a81a5164.diff
LOG: Add declaration for `__tsan_default_options` to tsan_interface.h
`__tsan_default_options` is part of the tsan interface so should be
exposed in tsan_interface.h.
Differential Revision: https://reviews.llvm.org/D146259
Added:
Modified:
compiler-rt/lib/tsan/rtl/tsan_flags.cpp
compiler-rt/lib/tsan/rtl/tsan_interface.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/tsan/rtl/tsan_flags.cpp b/compiler-rt/lib/tsan/rtl/tsan_flags.cpp
index ee78f25cc65c4..3fd58f46983fd 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_flags.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_flags.cpp
@@ -10,19 +10,21 @@
//
//===----------------------------------------------------------------------===//
-#include "sanitizer_common/sanitizer_flags.h"
+#include "tsan_flags.h"
+
#include "sanitizer_common/sanitizer_flag_parser.h"
+#include "sanitizer_common/sanitizer_flags.h"
#include "sanitizer_common/sanitizer_libc.h"
-#include "tsan_flags.h"
-#include "tsan_rtl.h"
+#include "tsan_interface.h"
#include "tsan_mman.h"
+#include "tsan_rtl.h"
#include "ubsan/ubsan_flags.h"
namespace __tsan {
// Can be overriden in frontend.
#ifdef TSAN_EXTERNAL_HOOKS
-extern "C" const char* __tsan_default_options();
+extern "C" const char *__tsan_default_options();
#else
SANITIZER_WEAK_DEFAULT_IMPL
const char *__tsan_default_options() {
diff --git a/compiler-rt/lib/tsan/rtl/tsan_interface.h b/compiler-rt/lib/tsan/rtl/tsan_interface.h
index 5b9d664e503fc..b32fb657adc3e 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_interface.h
+++ b/compiler-rt/lib/tsan/rtl/tsan_interface.h
@@ -32,6 +32,9 @@ extern "C" {
// before any instrumented code is executed and before any call to malloc.
SANITIZER_INTERFACE_ATTRIBUTE void __tsan_init();
+SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE const char *
+__tsan_default_options();
+
SANITIZER_INTERFACE_ATTRIBUTE void __tsan_flush_memory();
SANITIZER_INTERFACE_ATTRIBUTE void __tsan_read1(void *addr);
More information about the llvm-commits
mailing list