[profile] Address unused function warnings on Windows after D69586
authorVedant Kumar <vsk@apple.com>
Tue, 19 Nov 2019 20:51:10 +0000 (12:51 -0800)
committerVedant Kumar <vsk@apple.com>
Tue, 19 Nov 2019 20:51:12 +0000 (12:51 -0800)
This '#ifdef's out two functions which are unused on Windows, to prevent
-Wunused-function warnings.

compiler-rt/lib/profile/InstrProfilingFile.c

index 875cdf098b3a21a307d06a08e5e5a6f02bdf92f6..d775f6b2040f584208a4ec55a3e59df150207051 100644 (file)
@@ -414,6 +414,7 @@ static void assertIsZero(int *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) {
@@ -433,6 +434,7 @@ static void unlockProfile(int *ProfileRequiresUnlock, FILE *File) {
   lprofUnlockFileHandle(File);
   *ProfileRequiresUnlock = 0;
 }
+#endif // !defined(__Fuchsia__) && !defined(_WIN32)
 
 static void initializeProfileForContinuousMode(void) {
   if (!__llvm_profile_is_continuous_mode_enabled())