From 33fb9679ec6e288bc72f2aa19c8ef1576b4c66b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Fri, 20 Nov 2020 11:15:38 +0200 Subject: [PATCH] [compiler-rt] [profile] Silence a warning about an unused function on mingw targets This function is only used within the ifdef below. Differential Revision: https://reviews.llvm.org/D91850 --- compiler-rt/lib/profile/InstrProfilingFile.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c index bd1ec44..42ffdae 100644 --- a/compiler-rt/lib/profile/InstrProfilingFile.c +++ b/compiler-rt/lib/profile/InstrProfilingFile.c @@ -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) { -- 2.7.4