From: Eric Botcazou Date: Mon, 11 Jun 2018 09:15:47 +0000 (+0000) Subject: [Ada] Minor tweaks in Repinfo X-Git-Tag: upstream/12.2.0~31084 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=972d29849fc76fea06110ca5b3b3fbce1f9e1fd2;p=platform%2Fupstream%2Fgcc.git [Ada] Minor tweaks in Repinfo 2018-06-11 Eric Botcazou gcc/ada/ * repinfo.ads (Rep_Value): Use a single line. * repinfo.adb (Rep_Value): Likewise. (List_Attr): Do not use string concatenation. From-SVN: r261395 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ea2c131..e219120 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-06-11 Eric Botcazou + + * repinfo.ads (Rep_Value): Use a single line. + * repinfo.adb (Rep_Value): Likewise. + (List_Attr): Do not use string concatenation. + 2018-06-11 Ed Schonberg * exp_unst.adb (Visit_Node): Check reference to formal parameter of diff --git a/gcc/ada/repinfo.adb b/gcc/ada/repinfo.adb index 6c8af05..9b10a38 100644 --- a/gcc/ada/repinfo.adb +++ b/gcc/ada/repinfo.adb @@ -1772,11 +1772,15 @@ package body Repinfo is begin if List_Representation_Info_To_JSON then Write_Line (","); - Write_Str (" """ & Attr_Name & """: ""System."); + Write_Str (" """); + Write_Str (Attr_Name); + Write_Str (""": ""System."); else Write_Str ("for "); List_Name (Ent); - Write_Str ("'" & Attr_Name & " use System."); + Write_Char ('''); + Write_Str (Attr_Name); + Write_Str (" use System."); end if; if Bytes_Big_Endian xor Is_Reversed then @@ -1962,10 +1966,8 @@ package body Repinfo is -- Rep_Value -- --------------- - function Rep_Value - (Val : Node_Ref_Or_Val; - D : Discrim_List) return Uint - is + function Rep_Value (Val : Node_Ref_Or_Val; D : Discrim_List) return Uint is + function B (Val : Boolean) return Uint; -- Returns Uint_0 for False, Uint_1 for True diff --git a/gcc/ada/repinfo.ads b/gcc/ada/repinfo.ads index 79f93f9..feda436 100644 --- a/gcc/ada/repinfo.ads +++ b/gcc/ada/repinfo.ads @@ -379,9 +379,7 @@ package Repinfo is type Discrim_List is array (Pos range <>) of Uint; -- Type used to represent list of discriminant values - function Rep_Value - (Val : Node_Ref_Or_Val; - D : Discrim_List) return Uint; + function Rep_Value (Val : Node_Ref_Or_Val; D : Discrim_List) return Uint; -- Given the contents of a First_Bit_Position or Esize field containing -- a node reference (i.e. a negative Uint value) and D, the list of -- discriminant values, returns the interpreted value of this field.