X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FValgrind.h;h=12b0dc961daae37d0e43f24df977c3de9b7cb016;hb=fbf4c2b2e1b9e9d78bab2a199ab5082205aed9ae;hp=cebf75c49c1966ab5b0013e6d2475e43753c7414;hpb=6da21c0e335bca3186358f85948555f62eb8b375;p=oota-llvm.git diff --git a/include/llvm/Support/Valgrind.h b/include/llvm/Support/Valgrind.h index cebf75c49c1..12b0dc961da 100644 --- a/include/llvm/Support/Valgrind.h +++ b/include/llvm/Support/Valgrind.h @@ -20,17 +20,6 @@ #include "llvm/Support/Compiler.h" #include -#if LLVM_ENABLE_THREADS != 0 && !defined(NDEBUG) -// tsan (Thread Sanitizer) is a valgrind-based tool that detects these exact -// functions by name. -extern "C" { -void AnnotateHappensAfter(const char *file, int line, const volatile void *cv); -void AnnotateHappensBefore(const char *file, int line, const volatile void *cv); -void AnnotateIgnoreWritesBegin(const char *file, int line); -void AnnotateIgnoreWritesEnd(const char *file, int line); -} -#endif - namespace llvm { namespace sys { // True if Valgrind is controlling this process. @@ -39,34 +28,6 @@ namespace sys { // Discard valgrind's translation of code in the range [Addr .. Addr + Len). // Otherwise valgrind may continue to execute the old version of the code. void ValgrindDiscardTranslations(const void *Addr, size_t Len); - -#if LLVM_ENABLE_THREADS != 0 && !defined(NDEBUG) - // Thread Sanitizer is a valgrind tool that finds races in code. - // See http://code.google.com/p/data-race-test/wiki/DynamicAnnotations . - - // This marker is used to define a happens-before arc. The race detector will - // infer an arc from the begin to the end when they share the same pointer - // argument. - #define TsanHappensBefore(cv) \ - AnnotateHappensBefore(__FILE__, __LINE__, cv) - - // This marker defines the destination of a happens-before arc. - #define TsanHappensAfter(cv) \ - AnnotateHappensAfter(__FILE__, __LINE__, cv) - - // Ignore any races on writes between here and the next TsanIgnoreWritesEnd. - #define TsanIgnoreWritesBegin() \ - AnnotateIgnoreWritesBegin(__FILE__, __LINE__) - - // Resume checking for racy writes. - #define TsanIgnoreWritesEnd() \ - AnnotateIgnoreWritesEnd(__FILE__, __LINE__) -#else - #define TsanHappensBefore(cv) - #define TsanHappensAfter(cv) - #define TsanIgnoreWritesBegin() - #define TsanIgnoreWritesEnd() -#endif } }