@@ -197,7 +197,7 @@ sub read_bbg($);
197
197
sub read_gcno_word (*;$$);
198
198
sub read_gcno_value (*$;$$);
199
199
sub read_gcno_string (*$);
200
- sub read_gcno_lines_record (*$$$$$$);
200
+ sub read_gcno_lines_record (*$$$$$$$ );
201
201
sub determine_gcno_split_crc ($$$$);
202
202
sub read_gcno_function_record (*$$$$$);
203
203
sub read_gcno ($);
@@ -3421,16 +3421,16 @@ sub read_gcno_string(*$)
3421
3421
3422
3422
#
3423
3423
# read_gcno_lines_record(handle, gcno_filename, bb, fileorder, filename,
3424
- # function, big_endian)
3424
+ # function, big_endian, artificial )
3425
3425
#
3426
3426
# Read a gcno format lines record from handle and add the relevant data to
3427
3427
# bb and fileorder. Return filename on success, undef on error.
3428
3428
#
3429
3429
3430
- sub read_gcno_lines_record (*$$$$$$)
3430
+ sub read_gcno_lines_record (*$$$$$$$ )
3431
3431
{
3432
3432
my ($handle , $gcno_filename , $bb , $fileorder , $filename , $function ,
3433
- $big_endian ) = @_ ;
3433
+ $big_endian , $artificial ) = @_ ;
3434
3434
my $string ;
3435
3435
my $lineno ;
3436
3436
@@ -3462,9 +3462,12 @@ sub read_gcno_lines_record(*$$$$$$)
3462
3462
" $gcno_filename \n " );
3463
3463
next ;
3464
3464
}
3465
- # Add to list
3466
- push (@{$bb -> {$function }-> {$filename }}, $lineno );
3467
- graph_add_order($fileorder , $function , $filename );
3465
+
3466
+ if (!$artificial ) {
3467
+ # Add to list
3468
+ push (@{$bb -> {$function }-> {$filename }}, $lineno );
3469
+ graph_add_order($fileorder , $function , $filename );
3470
+ }
3468
3471
}
3469
3472
}
3470
3473
@@ -3517,7 +3520,7 @@ sub determine_gcno_split_crc($$$$)
3517
3520
# read_gcno_function_record(handle, graph, big_endian, rec_length, version)
3518
3521
#
3519
3522
# Read a gcno format function record from handle and add the relevant data
3520
- # to graph. Return (filename, function) on success, undef on error.
3523
+ # to graph. Return (filename, function, artificial ) on success, undef on error.
3521
3524
#
3522
3525
3523
3526
sub read_gcno_function_record (*$$$$$)
@@ -3527,6 +3530,7 @@ sub read_gcno_function_record(*$$$$$)
3527
3530
my $function ;
3528
3531
my $lineno ;
3529
3532
my $lines ;
3533
+ my $artificial ;
3530
3534
3531
3535
graph_expect(" function record" );
3532
3536
# Skip ident and checksum
@@ -3545,8 +3549,9 @@ sub read_gcno_function_record(*$$$$$)
3545
3549
$function = read_gcno_string($handle , $big_endian );
3546
3550
return undef if (!defined ($function ));
3547
3551
if ($version >= $GCOV_VERSION_8_0_0 ) {
3548
- graph_skip($handle , 4, " compiler-generated entity flag" )
3549
- or return undef ;
3552
+ $artificial = read_gcno_value($handle , $big_endian ,
3553
+ " compiler-generated entity flag" );
3554
+ return undef if (!defined ($artificial ));
3550
3555
}
3551
3556
# Read filename
3552
3557
graph_expect(" filename" );
@@ -3560,11 +3565,13 @@ sub read_gcno_function_record(*$$$$$)
3560
3565
graph_skip($handle , 4, " column number" ) or return undef ;
3561
3566
graph_skip($handle , 4, " ending line number" ) or return undef ;
3562
3567
}
3563
- # Add to list
3564
- push (@{$bb -> {$function }-> {$filename }}, $lineno );
3565
- graph_add_order($fileorder , $function , $filename );
3568
+ if (!$artificial ) {
3569
+ # Add to list
3570
+ push (@{$bb -> {$function }-> {$filename }}, $lineno );
3571
+ graph_add_order($fileorder , $function , $filename );
3572
+ }
3566
3573
3567
- return ($filename , $function );
3574
+ return ($filename , $function , $artificial );
3568
3575
}
3569
3576
3570
3577
#
@@ -3625,6 +3632,7 @@ sub read_gcno($)
3625
3632
my $graph ;
3626
3633
my $filelength ;
3627
3634
my $version ;
3635
+ my $artificial ;
3628
3636
local *HANDLE;
3629
3637
3630
3638
open (HANDLE, " <" , $gcno_filename ) or goto open_error;
@@ -3678,7 +3686,8 @@ sub read_gcno($)
3678
3686
}
3679
3687
# Process record
3680
3688
if ($tag == $tag_function ) {
3681
- ($filename , $function ) = read_gcno_function_record(
3689
+ ($filename , $function , $artificial ) =
3690
+ read_gcno_function_record(
3682
3691
*HANDLE, $bb , $fileorder , $big_endian ,
3683
3692
$length , $version );
3684
3693
goto incomplete if (!defined ($function ));
@@ -3687,7 +3696,7 @@ sub read_gcno($)
3687
3696
$filename = read_gcno_lines_record(*HANDLE,
3688
3697
$gcno_filename , $bb , $fileorder ,
3689
3698
$filename , $function ,
3690
- $big_endian );
3699
+ $big_endian , $artificial );
3691
3700
goto incomplete if (!defined ($filename ));
3692
3701
} else {
3693
3702
# Skip record contents
0 commit comments