[compiler-rt] r175037 - [tsan] simplify tsan-vs-gvn test since gvn vs tsan is now fixed; fix lint

Kostya Serebryany kcc at google.com
Tue Feb 12 22:07:50 PST 2013


Author: kcc
Date: Wed Feb 13 00:07:50 2013
New Revision: 175037

URL: http://llvm.org/viewvc/llvm-project?rev=175037&view=rev
Log:
[tsan] simplify tsan-vs-gvn test since gvn vs tsan is now fixed; fix lint 

Modified:
    compiler-rt/trunk/lib/asan/asan_interface_internal.h
    compiler-rt/trunk/lib/tsan/lit_tests/tsan-vs-gvn.cc

Modified: compiler-rt/trunk/lib/asan/asan_interface_internal.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interface_internal.h?rev=175037&r1=175036&r2=175037&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interface_internal.h (original)
+++ compiler-rt/trunk/lib/asan/asan_interface_internal.h Wed Feb 13 00:07:50 2013
@@ -23,7 +23,7 @@ extern "C" {
   // This function should be called at the very beginning of the process,
   // before any instrumented code is executed and before any call to malloc.
   // Everytime the asan ABI changes we also change the version number in this
-  // name. Objects build with incompatible asan ABI version 
+  // name. Objects build with incompatible asan ABI version
   // will not link with run-time.
   void __asan_init_v1() SANITIZER_INTERFACE_ATTRIBUTE;
   #define __asan_init __asan_init_v1

Modified: compiler-rt/trunk/lib/tsan/lit_tests/tsan-vs-gvn.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/tsan-vs-gvn.cc?rev=175037&r1=175036&r2=175037&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/lit_tests/tsan-vs-gvn.cc (original)
+++ compiler-rt/trunk/lib/tsan/lit_tests/tsan-vs-gvn.cc Wed Feb 13 00:07:50 2013
@@ -1,5 +1,6 @@
-// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK_O1
-// ---RUN: %clangxx_tsan -O2 %s -o %t && %t 2>&1 | FileCheck %s --check-prefix=CHECK_O2
+// RUN: %clangxx_tsan -O1 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O2 %s -o %t && %t 2>&1 | FileCheck %s
+// RUN: %clangxx_tsan -O3 %s -o %t && %t 2>&1 | FileCheck %s
 //
 // Check that load widening is not tsan-hostile.
 #include <pthread.h>
@@ -33,8 +34,5 @@ int main() {
   printf("PASS\n");
 }
 
-// FIXME: currently, this test fails at -O2 (reports false positive).
-// CHECK_O2: WARNING: ThreadSanitizer: data race
-
-// CHECK_O1: PASS
-// CHECK_O1-NOT: WARNING: ThreadSanitizer: data race
+// CHECK-NOT: WARNING: ThreadSanitizer: data race
+// CHECK: PASS





More information about the llvm-commits mailing list