[llvm-commits] [compiler-rt] r170499 - in /compiler-rt/trunk/lib/tsan: Makefile.old rtl/Makefile.old rtl/tsan_interceptors.cc

Dmitry Vyukov dvyukov at google.com
Tue Dec 18 22:59:45 PST 2012


Author: dvyukov
Date: Wed Dec 19 00:59:45 2012
New Revision: 170499

URL: http://llvm.org/viewvc/llvm-project?rev=170499&view=rev
Log:
tsan: fix -Wgnu warnings

Modified:
    compiler-rt/trunk/lib/tsan/Makefile.old
    compiler-rt/trunk/lib/tsan/rtl/Makefile.old
    compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc

Modified: compiler-rt/trunk/lib/tsan/Makefile.old
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/Makefile.old?rev=170499&r1=170498&r2=170499&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/Makefile.old (original)
+++ compiler-rt/trunk/lib/tsan/Makefile.old Wed Dec 19 00:59:45 2012
@@ -8,7 +8,7 @@
 	CXXFLAGS += -O3
 endif
 ifeq ($(CXX), clang++)
-  CXXFLAGS+= -Wno-unused-private-field -Wno-static-in-inline
+  CXXFLAGS+= -Wno-unused-private-field -Wno-static-in-inline -Wgnu
 endif
 
 LIBTSAN=rtl/libtsan.a
@@ -35,7 +35,7 @@
 	@ echo "  make install_deps  # Install third-party dependencies required for building"
 	@ echo "  make presubmit     # Run it every time before committing"
 	@ echo
-	@ echo "For more info, see http://code.google.com/p/data-race-test/wiki/ThreadSanitizer2"
+	@ echo "For more info, see http://code.google.com/p/thread-sanitizer/wiki/Development"
 
 $(LIBTSAN): libtsan
 

Modified: compiler-rt/trunk/lib/tsan/rtl/Makefile.old
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/Makefile.old?rev=170499&r1=170498&r2=170499&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/Makefile.old (original)
+++ compiler-rt/trunk/lib/tsan/rtl/Makefile.old Wed Dec 19 00:59:45 2012
@@ -1,6 +1,9 @@
 CXXFLAGS = -fPIE -g -Wall -Werror -fno-builtin -DTSAN_DEBUG=$(DEBUG)
 ifeq ($(DEBUG), 0)
-	CXXFLAGS += -O3
+  CXXFLAGS += -O3
+endif
+ifeq ($(CXX), clang++)
+  CXXFLAGS+= -Wgnu
 endif
 
 # For interception. FIXME: move interception one level higher.

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=170499&r1=170498&r2=170499&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Wed Dec 19 00:59:45 2012
@@ -1137,9 +1137,9 @@
   return fd;
 }
 
-TSAN_INTERCEPTOR(int, inotify_init) {
-  SCOPED_TSAN_INTERCEPTOR(inotify_init);
-  int fd = REAL(inotify_init)();
+TSAN_INTERCEPTOR(int, inotify_init, int fake) {
+  SCOPED_TSAN_INTERCEPTOR(inotify_init, fake);
+  int fd = REAL(inotify_init)(fake);
   if (fd >= 0)
     FdInotifyCreate(thr, pc, fd);
   return fd;
@@ -1617,10 +1617,10 @@
   return 0;
 }
 
-TSAN_INTERCEPTOR(int, fork) {
-  SCOPED_TSAN_INTERCEPTOR(fork);
+TSAN_INTERCEPTOR(int, fork, int fake) {
+  SCOPED_TSAN_INTERCEPTOR(fork, fake);
   // It's intercepted merely to process pending signals.
-  int pid = REAL(fork)();
+  int pid = REAL(fork)(fake);
   if (pid == 0) {
     // child
     FdOnFork(thr, pc);





More information about the llvm-commits mailing list