Changeset View
Changeset View
Standalone View
Standalone View
openmp/runtime/tools/generate-def.pl
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | |||||
sub process(\%) { | sub process(\%) { | ||||
my ( $entries ) = @_; | my ( $entries ) = @_; | ||||
foreach my $entry ( keys( %$entries ) ) { | foreach my $entry ( keys( %$entries ) ) { | ||||
if ( not $entries->{ $entry }->{ obsolete } ) { | if ( not $entries->{ $entry }->{ obsolete } ) { | ||||
my $ordinal = $entries->{ $entry }->{ ordinal }; | my $ordinal = $entries->{ $entry }->{ ordinal }; | ||||
# omp_alloc, omp_calloc and omp_free are C/C++ only functions, skip "1000+ordinal" for them | # omp_alloc, omp_calloc, omp_realloc and omp_free are C/C++ only functions, skip "1000+ordinal" for them | ||||
if ( $entry =~ m{\A[ok]mp_} and $entry ne "omp_alloc" and $entry ne "omp_calloc" and $entry ne "omp_free" ) { | if ( $entry =~ m{\A[ok]mp_} and $entry ne "omp_alloc" and $entry ne "omp_calloc" and | ||||
$entry ne "omp_realloc" and $entry ne "omp_free" ) { | |||||
if ( not defined( $ordinal ) ) { | if ( not defined( $ordinal ) ) { | ||||
runtime_error( | runtime_error( | ||||
"Bad entry \"$entry\": ordinal number is not specified." | "Bad entry \"$entry\": ordinal number is not specified." | ||||
); | ); | ||||
}; # if | }; # if | ||||
if ( $ordinal ne "DATA" ) { | if ( $ordinal ne "DATA" ) { | ||||
$entries->{ uc( $entry ) } = { ordinal => 1000 + $ordinal }; | $entries->{ uc( $entry ) } = { ordinal => 1000 + $ordinal }; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines |