tsan: allow to override OnFinalize() in front-ends that does not support weak functions (Go)

llvm-svn: 192569
This commit is contained in:
Dmitry Vyukov 2013-10-14 06:31:03 +00:00
parent d7abdb6f12
commit abc416f326
1 changed files with 5 additions and 1 deletions

View File

@ -39,9 +39,13 @@ THREADLOCAL char cur_thread_placeholder[sizeof(ThreadState)] ALIGNED(64);
static char ctx_placeholder[sizeof(Context)] ALIGNED(64);
// Can be overriden by a front-end.
bool CPP_WEAK OnFinalize(bool failed) {
#ifdef TSAN_EXTERNAL_HOOKS
bool OnFinalize(bool failed);
#else
bool WEAK OnFinalize(bool failed) {
return failed;
}
#endif
static Context *ctx;
Context *CTX() {