summaryrefslogtreecommitdiff
path: root/gcc/ada/namet.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-20 15:59:01 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-20 15:59:01 +0000
commit3b29b578703de88f0f96db9bb858304d27a2ad74 (patch)
treefc1b4c64b1b25a5f52510966575b600e26785069 /gcc/ada/namet.adb
parent5848c69ef21d42c1fe7b020bc230372103002fac (diff)
downloadgcc-3b29b578703de88f0f96db9bb858304d27a2ad74.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217882 138bc75d-0d04-0410-961f-82ee72b054a4
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 1a946402845..e6df9db610d 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 --
-------------------------