diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 13:54:10 +0000 |
commit | 63faed5b8e4f2755f127fcb8aa440480c0649327 (patch) | |
tree | 19c69a04768629f2d440944b71cbe90adae0b615 /lib/Support/Valgrind.cpp | |
parent | d4c8b5d2e851b0e8a063c6bf8543a4823a26c15a (diff) |
Diffstat (limited to 'lib/Support/Valgrind.cpp')
-rw-r--r-- | lib/Support/Valgrind.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Support/Valgrind.cpp b/lib/Support/Valgrind.cpp index 703448524ed9..2b250a357758 100644 --- a/lib/Support/Valgrind.cpp +++ b/lib/Support/Valgrind.cpp @@ -52,3 +52,16 @@ void llvm::sys::ValgrindDiscardTranslations(const void *Addr, size_t Len) { } #endif // !HAVE_VALGRIND_VALGRIND_H + +#if LLVM_ENABLE_THREADS != 0 && !defined(NDEBUG) +// These functions require no implementation, tsan just looks at the arguments +// they're called with. +extern "C" { +void AnnotateHappensBefore(const char *file, int line, + const volatile void *cv) {} +void AnnotateHappensAfter(const char *file, int line, + const volatile void *cv) {} +void AnnotateIgnoreWritesBegin(const char *file, int line) {} +void AnnotateIgnoreWritesEnd(const char *file, int line) {} +} +#endif |