aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorJavier Miranda <miranda@adacore.com>2018-05-22 13:26:23 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-22 13:26:23 +0000
commitb00baef5ad6140128cf7510aa5928bdf032717cb (patch)
tree2e104d23ed454dc694d2515be26d9c56d539a6b4 /gcc/builtins.c
parent90fa86136a27e147c0bb53434696c2baaba62b41 (diff)
downloadgcc-b00baef5ad6140128cf7510aa5928bdf032717cb.zip
gcc-b00baef5ad6140128cf7510aa5928bdf032717cb.tar.gz
gcc-b00baef5ad6140128cf7510aa5928bdf032717cb.tar.bz2
[Ada] Disable name generation for External_Tag and Expanded_Name
In order to avoid exposing internal names of tagged types in the binary code generated by the compiler this enhancement facilitates initializes the External_Tag of a tagged type with an empty string when pragma No_Tagged_Streams is applicable to the tagged type, and facilitates initializes its Expanded_Name with an empty string when pragma Discard_Names is applicable to the tagged type. This enhancement can be verified by means of the following small test: package Library_Level_Test is type Typ_01 is tagged null record; -- Case 1: No pragmas type Typ_02 is tagged null record; -- Case 2: Discard_Names pragma Discard_Names (Typ_02); pragma No_Tagged_Streams; type Typ_03 is tagged null record; -- Case 3: No_Tagged_Streams type Typ_04 is tagged null record; -- Case 4: Both pragmas pragma Discard_Names (Typ_04); end; Commands: gcc -c -gnatD library_level_test.ads grep "\.TYP_" library_level_test.ads.dg Output: "LIBRARY_LEVEL_TEST.TYP_01["00"]"; "LIBRARY_LEVEL_TEST.TYP_02["00"]"; "LIBRARY_LEVEL_TEST.TYP_03["00"]"; 2018-05-22 Javier Miranda <miranda@adacore.com> gcc/ada/ * exp_disp.adb (Make_DT): Initialize the External_Tag with an empty string when pragma No_Tagged_Streams is applicable to the tagged type, and initialize the Expanded_Name with an empty string when pragma Discard_Names is applicable to the tagged type. From-SVN: r260528
Diffstat (limited to 'gcc/builtins.c')
0 files changed, 0 insertions, 0 deletions