tsan: remove DontDumpShadow from Go build
authorDmitry Vyukov <dvyukov@google.com>
Wed, 22 Sep 2021 15:50:54 +0000 (17:50 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Thu, 23 Sep 2021 08:45:05 +0000 (10:45 +0200)
DontDumpShadow is used only in InitializeShadowMemory which is Go-only.

Depends on D110263.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110264

compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp

index 55c2919..763ac44 100644 (file)
@@ -31,6 +31,7 @@ static const char kShadowMemoryMappingHint[] =
     "HINT: if %s is not supported in your environment, you may set "
     "TSAN_OPTIONS=%s=0\n";
 
+#  if !SANITIZER_GO
 static void DontDumpShadow(uptr addr, uptr size) {
   if (common_flags()->use_madv_dontdump)
     if (!DontDumpShadowMemory(addr, size)) {
@@ -41,7 +42,6 @@ static void DontDumpShadow(uptr addr, uptr size) {
     }
 }
 
-#if !SANITIZER_GO
 void InitializeShadowMemory() {
   // Map memory shadow.
   if (!MmapFixedSuperNoReserve(ShadowBeg(), ShadowEnd() - ShadowBeg(),