tsan: fix Go build
authorDmitry Vyukov <dvyukov@google.com>
Thu, 11 Dec 2014 16:12:45 +0000 (16:12 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Thu, 11 Dec 2014 16:12:45 +0000 (16:12 +0000)
GetRSS is used in Go build.

llvm-svn: 224023

compiler-rt/lib/sanitizer_common/sanitizer_linux.cc

index 502ea48..36de1ec 100644 (file)
@@ -379,6 +379,7 @@ static void ReadNullSepFileToArray(const char *path, char ***arr,
   }
   (*arr)[count] = 0;
 }
+#endif
 
 uptr GetRSS() {
   uptr fd = OpenFile("/proc/self/statm", false);
@@ -407,8 +408,6 @@ uptr GetRSS() {
   return rss * 4096;
 }
 
-#endif
-
 static void GetArgsAndEnv(char*** argv, char*** envp) {
 #if !SANITIZER_GO
   if (&__libc_stack_end) {