[compiler-rt] 0d4211f - [profile] Address unused function warnings on Windows after D69586

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 12:52:53 PST 2019


Author: Vedant Kumar
Date: 2019-11-19T12:51:12-08:00
New Revision: 0d4211f4e753057feec32938e596d037d4f5a6aa

URL: https://github.com/llvm/llvm-project/commit/0d4211f4e753057feec32938e596d037d4f5a6aa
DIFF: https://github.com/llvm/llvm-project/commit/0d4211f4e753057feec32938e596d037d4f5a6aa.diff

LOG: [profile] Address unused function warnings on Windows after D69586

This '#ifdef's out two functions which are unused on Windows, to prevent
-Wunused-function warnings.

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 875cdf098b3a..d775f6b2040f 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -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())


        


More information about the llvm-commits mailing list