Commit 972d2984 by Eric Botcazou Committed by Pierre-Marie de Rodat

[Ada] Minor tweaks in Repinfo

2018-06-11  Eric Botcazou  <ebotcazou@adacore.com>

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
parent b516a1a9
2018-06-11 Eric Botcazou <ebotcazou@adacore.com>
* 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 <schonberg@adacore.com>
* exp_unst.adb (Visit_Node): Check reference to formal parameter of
......
......@@ -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
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment