[compiler-rt] 1aacf58 - [profile] Unbreak Fuchsia/Windows after D68351

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


Author: Vedant Kumar
Date: 2019-11-19T12:29:57-08:00
New Revision: 1aacf58819a27f428a46ce839a0ee797af03c1fd

URL: https://github.com/llvm/llvm-project/commit/1aacf58819a27f428a46ce839a0ee797af03c1fd
DIFF: https://github.com/llvm/llvm-project/commit/1aacf58819a27f428a46ce839a0ee797af03c1fd.diff

LOG: [profile] Unbreak Fuchsia/Windows after D68351

Continuous mode is not yet supported on Fuchsia/Windows, however an
error should not be reported unless the user attempted to actually
enable continuous mode.

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 208ae587bb3e..875cdf098b3a 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -435,12 +435,12 @@ static void unlockProfile(int *ProfileRequiresUnlock, FILE *File) {
 }
 
 static void initializeProfileForContinuousMode(void) {
-#if defined(__Fuchsia__) || defined(_WIN32)
-  PROF_ERR("%s\n", "Continuous mode not yet supported on Fuchsia or Windows.");
-#else // defined(__Fuchsia__) || defined(_WIN32)
   if (!__llvm_profile_is_continuous_mode_enabled())
     return;
 
+#if defined(__Fuchsia__) || defined(_WIN32)
+  PROF_ERR("%s\n", "Continuous mode not yet supported on Fuchsia or Windows.");
+#else // defined(__Fuchsia__) || defined(_WIN32)
   /* Get the sizes of various profile data sections. Taken from
    * __llvm_profile_get_size_for_buffer(). */
   const __llvm_profile_data *DataBegin = __llvm_profile_begin_data();


        


More information about the llvm-commits mailing list