@@ -228,6 +228,7 @@ static void unmap_file() {
228
228
* profiling enabled will emit to a different file. Only one file may be
229
229
* started at a time.
230
230
*/
231
+ COMPILER_RT_VISIBILITY
231
232
void llvm_gcda_start_file (const char * orig_filename , const char version [4 ],
232
233
uint32_t checksum ) {
233
234
const char * mode = "r+b" ;
@@ -295,6 +296,7 @@ void llvm_gcda_start_file(const char *orig_filename, const char version[4],
295
296
/* Given an array of pointers to counters (counters), increment the n-th one,
296
297
* where we're also given a pointer to n (predecessor).
297
298
*/
299
+ COMPILER_RT_VISIBILITY
298
300
void llvm_gcda_increment_indirect_counter (uint32_t * predecessor ,
299
301
uint64_t * * counters ) {
300
302
uint64_t * counter ;
@@ -317,6 +319,7 @@ void llvm_gcda_increment_indirect_counter(uint32_t *predecessor,
317
319
#endif
318
320
}
319
321
322
+ COMPILER_RT_VISIBILITY
320
323
void llvm_gcda_emit_function (uint32_t ident , const char * function_name ,
321
324
uint32_t func_checksum , uint8_t use_extra_checksum ,
322
325
uint32_t cfg_checksum ) {
@@ -343,6 +346,7 @@ void llvm_gcda_emit_function(uint32_t ident, const char *function_name,
343
346
write_string (function_name );
344
347
}
345
348
349
+ COMPILER_RT_VISIBILITY
346
350
void llvm_gcda_emit_arcs (uint32_t num_counters , uint64_t * counters ) {
347
351
uint32_t i ;
348
352
uint64_t * old_ctrs = NULL ;
@@ -394,6 +398,7 @@ void llvm_gcda_emit_arcs(uint32_t num_counters, uint64_t *counters) {
394
398
#endif
395
399
}
396
400
401
+ COMPILER_RT_VISIBILITY
397
402
void llvm_gcda_summary_info () {
398
403
const uint32_t obj_summary_len = 9 ; /* Length for gcov compatibility. */
399
404
uint32_t i ;
@@ -447,6 +452,7 @@ void llvm_gcda_summary_info() {
447
452
#endif
448
453
}
449
454
455
+ COMPILER_RT_VISIBILITY
450
456
void llvm_gcda_end_file () {
451
457
/* Write out EOF record. */
452
458
if (output_file ) {
@@ -472,6 +478,7 @@ void llvm_gcda_end_file() {
472
478
#endif
473
479
}
474
480
481
+ COMPILER_RT_VISIBILITY
475
482
void llvm_register_writeout_function (writeout_fn fn ) {
476
483
struct writeout_fn_node * new_node = malloc (sizeof (struct writeout_fn_node ));
477
484
new_node -> fn = fn ;
@@ -485,6 +492,7 @@ void llvm_register_writeout_function(writeout_fn fn) {
485
492
}
486
493
}
487
494
495
+ COMPILER_RT_VISIBILITY
488
496
void llvm_writeout_files (void ) {
489
497
struct writeout_fn_node * curr = writeout_fn_head ;
490
498
@@ -494,6 +502,7 @@ void llvm_writeout_files(void) {
494
502
}
495
503
}
496
504
505
+ COMPILER_RT_VISIBILITY
497
506
void llvm_delete_writeout_function_list (void ) {
498
507
while (writeout_fn_head ) {
499
508
struct writeout_fn_node * node = writeout_fn_head ;
@@ -504,6 +513,7 @@ void llvm_delete_writeout_function_list(void) {
504
513
writeout_fn_head = writeout_fn_tail = NULL ;
505
514
}
506
515
516
+ COMPILER_RT_VISIBILITY
507
517
void llvm_register_flush_function (flush_fn fn ) {
508
518
struct flush_fn_node * new_node = malloc (sizeof (struct flush_fn_node ));
509
519
new_node -> fn = fn ;
@@ -517,6 +527,7 @@ void llvm_register_flush_function(flush_fn fn) {
517
527
}
518
528
}
519
529
530
+ COMPILER_RT_VISIBILITY
520
531
void __gcov_flush () {
521
532
struct flush_fn_node * curr = flush_fn_head ;
522
533
@@ -526,6 +537,7 @@ void __gcov_flush() {
526
537
}
527
538
}
528
539
540
+ COMPILER_RT_VISIBILITY
529
541
void llvm_delete_flush_function_list (void ) {
530
542
while (flush_fn_head ) {
531
543
struct flush_fn_node * node = flush_fn_head ;
@@ -536,6 +548,7 @@ void llvm_delete_flush_function_list(void) {
536
548
flush_fn_head = flush_fn_tail = NULL ;
537
549
}
538
550
551
+ COMPILER_RT_VISIBILITY
539
552
void llvm_gcov_init (writeout_fn wfn , flush_fn ffn ) {
540
553
static int atexit_ran = 0 ;
541
554
0 commit comments