diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-12-02 15:30:36 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2022-01-06 17:11:33 +0000 |
commit | 337417795afd624c479c49529a935ee096700457 (patch) | |
tree | 050b7adf1a0ab7b8ea116b74152657db1858cbeb /gcc/ada/par-ch4.adb | |
parent | 7f08c075994ac37172ff31f6633d6310d5327090 (diff) | |
download | gcc-337417795afd624c479c49529a935ee096700457.zip gcc-337417795afd624c479c49529a935ee096700457.tar.gz gcc-337417795afd624c479c49529a935ee096700457.tar.bz2 |
[Ada] Remove duplicates of empty strings
gcc/ada/
* par-ch4.adb (P_Simple_Expression): Reuse Null_String_Id.
* prep.adb (Parse_Def_File): Likewise; remove Empty_String.
Diffstat (limited to 'gcc/ada/par-ch4.adb')
-rw-r--r-- | gcc/ada/par-ch4.adb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/ada/par-ch4.adb b/gcc/ada/par-ch4.adb index d985003..4b021e7 100644 --- a/gcc/ada/par-ch4.adb +++ b/gcc/ada/par-ch4.adb @@ -2471,9 +2471,6 @@ package body Ch4 is and then Num_Concats >= Num_Concats_Threshold then declare - Empty_String_Val : String_Id; - -- String_Id for "" - Strlit_Concat_Val : String_Id; -- Contains the folded value (which will be correct if the -- "&" operators are the predefined ones). @@ -2509,11 +2506,9 @@ package body Ch4 is -- Create new folded node, and rewrite result with a concat- -- enation of an empty string literal and the folded node. - Start_String; - Empty_String_Val := End_String; New_Node := Make_Op_Concat (Loc, - Make_String_Literal (Loc, Empty_String_Val), + Make_String_Literal (Loc, Null_String_Id), Make_String_Literal (Loc, Strlit_Concat_Val, Is_Folded_In_Parser => True)); Rewrite (Node1, New_Node); |