aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/namet.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-11-20 16:59:01 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-11-20 16:59:01 +0100
commit572f38e4b24c395d3841f9fb8939037885222e4e (patch)
treefc1b4c64b1b25a5f52510966575b600e26785069 /gcc/ada/namet.adb
parent28eccd34faa42af5012ac8a3002e022131fb0b4f (diff)
downloadgcc-572f38e4b24c395d3841f9fb8939037885222e4e.zip
gcc-572f38e4b24c395d3841f9fb8939037885222e4e.tar.gz
gcc-572f38e4b24c395d3841f9fb8939037885222e4e.tar.bz2
[multiple changes]
2014-11-20 Thomas Quinot <quinot@adacore.com> * freeze.adb (Freeze_Entity): Do not reset Is_True_Constant for aliased constant objects. 2014-11-20 Robert Dewar <dewar@adacore.com> * exp_util.adb (Following_Address_Clause): Use new Name_Table boolean flag set by parser to avoid the search if there is no address clause anywhere for the name. * namet.adb (Name_Enter): Initialize Boolean_Info flag (Name_Find): ditto (Reinitialize): ditto (Get_Name_Table_Boolean): New function (Set_Name_Table_Boolean): New procedure * namet.ads: Add and document new Boolean field in name table (Get_Name_Table_Boolean): New function. (Set_Name_Table_Boolean): New procedure. * par-ch13.adb (P_Representation_Clause): Set Name_Table boolean flag for an identifier name if we detect an address clause or use-at clause for the identifier. * sem_ch3.adb (Analyze_Object_Declaration): Remove comment about Following_Address_Clause since this function is now optimized and is not a performance concern. * sem_prag.adb (Analyze_Pragma, case Elaborate): In SPARK mode, pragma Elaborate is now allowed, but does not suppress elaboration checking. From-SVN: r217882
Diffstat (limited to 'gcc/ada/namet.adb')
-rw-r--r--gcc/ada/namet.adb25
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ada/namet.adb b/gcc/ada/namet.adb
index 1a94640..e6df9db 100644
--- a/gcc/ada/namet.adb
+++ b/gcc/ada/namet.adb
@@ -705,6 +705,16 @@ package body Namet is
end loop;
end Get_Name_String_And_Append;
+ ----------------------------
+ -- Get_Name_Table_Boolean --
+ ----------------------------
+
+ function Get_Name_Table_Boolean (Id : Name_Id) return Boolean is
+ begin
+ pragma Assert (Id in Name_Entries.First .. Name_Entries.Last);
+ return Name_Entries.Table (Id).Boolean_Info;
+ end Get_Name_Table_Boolean;
+
-------------------------
-- Get_Name_Table_Byte --
-------------------------
@@ -923,6 +933,7 @@ package body Namet is
Name_Len => Short (Name_Len),
Byte_Info => 0,
Int_Info => 0,
+ Boolean_Info => False,
Name_Has_No_Encodings => False,
Hash_Link => No_Name));
@@ -1025,7 +1036,8 @@ package body Namet is
Hash_Link => No_Name,
Name_Has_No_Encodings => False,
Int_Info => 0,
- Byte_Info => 0));
+ Byte_Info => 0,
+ Boolean_Info => False));
-- Set corresponding string entry in the Name_Chars table
@@ -1250,6 +1262,7 @@ package body Namet is
Name_Len => 1,
Byte_Info => 0,
Int_Info => 0,
+ Boolean_Info => False,
Name_Has_No_Encodings => True,
Hash_Link => No_Name));
@@ -1287,6 +1300,16 @@ package body Namet is
Store_Encoded_Character (C);
end Set_Character_Literal_Name;
+ ----------------------------
+ -- Set_Name_Table_Boolean --
+ ----------------------------
+
+ procedure Set_Name_Table_Boolean (Id : Name_Id; Val : Boolean) is
+ begin
+ pragma Assert (Id in Name_Entries.First .. Name_Entries.Last);
+ Name_Entries.Table (Id).Boolean_Info := Val;
+ end Set_Name_Table_Boolean;
+
-------------------------
-- Set_Name_Table_Byte --
-------------------------