[llvm-branch-commits] [compiler-rt] 33fb967 - [compiler-rt] [profile] Silence a warning about an unused function on mingw targets

Martin Storsjö via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Nov 21 12:19:23 PST 2020


Author: Martin Storsjö
Date: 2020-11-21T22:14:35+02:00
New Revision: 33fb9679ec6e288bc72f2aa19c8ef1576b4c66b9

URL: https://github.com/llvm/llvm-project/commit/33fb9679ec6e288bc72f2aa19c8ef1576b4c66b9
DIFF: https://github.com/llvm/llvm-project/commit/33fb9679ec6e288bc72f2aa19c8ef1576b4c66b9.diff

LOG: [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

Added: 
    

Modified: 
    compiler-rt/lib/profile/InstrProfilingFile.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c
index bd1ec44fc77e..42ffdae82622 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) {


        


More information about the llvm-branch-commits mailing list