===================================================================
@@ -359,6 +359,7 @@
Name_Line,
Name_Source_Location,
Name_Enclosing_Entity,
+ Name_Compilation_ISO_Date,
Name_Compilation_Date,
Name_Compilation_Time)
then
===================================================================
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
+-- Copyright (C) 2000-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -79,6 +79,10 @@
-- package itself. This is useful in identifying and logging information
-- from within generic templates.
+ function Compilation_ISO_Date return String with
+ Import, Convention => Intrinsic;
+ -- Returns date of compilation as a static string "yyyy-mm-dd".
+
function Compilation_Date return String with
Import, Convention => Intrinsic;
-- Returns date of compilation as a static string "mmm dd yyyy". This is
===================================================================
@@ -107,14 +107,10 @@
-- System.Address_To_Access_Conversions.
procedure Expand_Source_Info (N : Node_Id; Nam : Name_Id);
- -- Rewrite the node by the appropriate string or positive constant.
- -- Nam can be one of the following:
- -- Name_File - expand string name of source file
- -- Name_Line - expand integer line number
- -- Name_Source_Location - expand string of form file:line
- -- Name_Enclosing_Entity - expand string name of enclosing entity
- -- Name_Compilation_Date - expand string with compilation date
- -- Name_Compilation_Time - expand string with compilation time
+ -- Rewrite the node as the appropriate string literal or positive
+ -- constant. Nam is the name of one of the intrinsics declared in
+ -- GNAT.Source_Info; see g-souinf.ads for documentation of these
+ -- intrinsics.
procedure Write_Entity_Name (E : Entity_Id);
-- Recursive procedure to construct string for qualified name of enclosing
@@ -165,6 +161,10 @@
Write_Entity_Name (Ent);
+ when Name_Compilation_ISO_Date =>
+ Name_Buffer (1 .. 10) := Opt.Compilation_Time (1 .. 10);
+ Name_Len := 10;
+
when Name_Compilation_Date =>
declare
subtype S13 is String (1 .. 3);
@@ -696,6 +696,7 @@
Name_Line,
Name_Source_Location,
Name_Enclosing_Entity,
+ Name_Compilation_ISO_Date,
Name_Compilation_Date,
Name_Compilation_Time)
then
@@ -851,6 +852,8 @@
------------------------
procedure Expand_Source_Info (N : Node_Id; Nam : Name_Id) is
+ -- ???There is duplicated code here (see Add_Source_Info)
+
Loc : constant Source_Ptr := Sloc (N);
Ent : Entity_Id;
@@ -891,6 +894,10 @@
Write_Entity_Name (Ent);
+ when Name_Compilation_ISO_Date =>
+ Name_Buffer (1 .. 10) := Opt.Compilation_Time (1 .. 10);
+ Name_Len := 10;
+
when Name_Compilation_Date =>
declare
subtype S13 is String (1 .. 3);
===================================================================
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
+-- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -31,15 +31,11 @@
package Exp_Intr is
procedure Add_Source_Info (Loc : Source_Ptr; Nam : Name_Id);
- -- Append a string to Name_Buffer depending on Nam
- -- Name_File - append name of source file
- -- Name_Line - append line number
- -- Name_Source_Location - append source location (file:line)
- -- Name_Enclosing_Entity - append name of enclosing entity
- -- Name_Compilation_Date - append compilation date
- -- Name_Compilation_Time - append compilation time
- -- The caller must set Name_Buffer and Name_Len before the call. Loc is
- -- passed to provide location information where it is needed.
+ -- Append a string to Name_Buffer depending on Nam, which is the name of
+ -- one of the intrinsics declared in GNAT.Source_Info; see g-souinf.ads for
+ -- documentation of these intrinsics. The caller must set Name_Buffer and
+ -- Name_Len before the call. Loc is passed to provide location information
+ -- where it is needed.
procedure Expand_Intrinsic_Call (N : Node_Id; E : Entity_Id);
-- N is either a function call node, a procedure call statement node, or
===================================================================
@@ -1204,6 +1204,7 @@
-- convention name. So is To_Address, which is a GNAT attribute.
First_Intrinsic_Name : constant Name_Id := N + $;
+ Name_Compilation_ISO_Date : constant Name_Id := N + $;
Name_Compilation_Date : constant Name_Id := N + $;
Name_Compilation_Time : constant Name_Id := N + $;
Name_Divide : constant Name_Id := N + $;