File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -130,11 +130,9 @@ COMPILER_RT_VISIBILITY
130130int __llvm_profile_merge_from_buffer (const char * ProfileData ,
131131 uint64_t ProfileSize ) {
132132 if (__llvm_profile_get_version () & VARIANT_MASK_TEMPORAL_PROF ) {
133- #ifndef COMPILER_RT_PROFILE_BAREMETAL
134133 PROF_ERR ("%s\n" ,
135134 "Temporal profiles do not support profile merging at runtime. "
136135 "Instead, merge raw profiles using the llvm-profdata tool." );
137- #endif
138136 return 1 ;
139137 }
140138
Original file line number Diff line number Diff line change @@ -122,6 +122,12 @@ static inline size_t getpagesize(void) {
122122#endif
123123#endif /* defined(_WIN32) */
124124
125+ #ifdef COMPILER_RT_PROFILE_BAREMETAL
126+ // Baremetal doesn't support logging
127+ #define PROF_ERR (Format , ...)
128+ #define PROF_WARN (Format , ...)
129+ #define PROF_NOTE (Format , ...)
130+ #else
125131#define PROF_ERR (Format , ...) \
126132 fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);
127133
@@ -130,6 +136,7 @@ static inline size_t getpagesize(void) {
130136
131137#define PROF_NOTE (Format , ...) \
132138 fprintf(stderr, "LLVM Profile Note: " Format, __VA_ARGS__);
139+ #endif /* COMPILER_RT_PROFILE_BAREMETAL */
133140
134141#ifndef MAP_FILE
135142#define MAP_FILE 0
You can’t perform that action at this time.
0 commit comments