[compiler-rt] [profile] Silence a warning about an unused function on mingw targets
authorMartin Storsjö <martin@martin.st>
Fri, 20 Nov 2020 09:15:38 +0000 (11:15 +0200)
committerMartin Storsjö <martin@martin.st>
Sat, 21 Nov 2020 20:14:35 +0000 (22:14 +0200)
This function is only used within the ifdef below.

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

compiler-rt/lib/profile/InstrProfilingFile.c

index bd1ec44fc77e14cfb928c6a9f47e4d6b224e0cc3..42ffdae82622297fcd9e31588582f9e1bb2fb618 100644 (file)
@@ -420,14 +420,12 @@ static void truncateCurrentFile(void) {
   fclose(File);
 }
 
-#ifndef _MSC_VER
+#if !defined(__Fuchsia__) && !defined(_WIN32)
 static void assertIsZero(int *i) {
   if (*i)
     PROF_WARN("Expected flag to be 0, but got: %d\n", *i);
 }
-#endif
 
-#if !defined(__Fuchsia__) && !defined(_WIN32)
 /* Write a partial profile to \p Filename, which is required to be backed by
  * the open file object \p File. */
 static int writeProfileWithFileObject(const char *Filename, FILE *File) {