forked from OSchip/llvm-project
tsan: add SANITIZER_INTERFACE_ATTRIBUTE to more callbacks
so that it's possible to override them from a dynamic library. llvm-svn: 200747
This commit is contained in:
parent
d23c79604e
commit
fd0affac37
|
@ -27,7 +27,8 @@ Flags *flags() {
|
|||
#ifdef TSAN_EXTERNAL_HOOKS
|
||||
extern "C" const char* __tsan_default_options();
|
||||
#else
|
||||
extern "C" const char *WEAK __tsan_default_options() {
|
||||
extern "C" SANITIZER_INTERFACE_ATTRIBUTE
|
||||
const char *WEAK __tsan_default_options() {
|
||||
return "";
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -43,9 +43,11 @@ static char ctx_placeholder[sizeof(Context)] ALIGNED(64);
|
|||
bool OnFinalize(bool failed);
|
||||
void OnInitialize();
|
||||
#else
|
||||
SANITIZER_INTERFACE_ATTRIBUTE
|
||||
bool WEAK OnFinalize(bool failed) {
|
||||
return failed;
|
||||
}
|
||||
SANITIZER_INTERFACE_ATTRIBUTE
|
||||
void WEAK OnInitialize() {}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue