aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/namet.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
commite252b51ccde010cbd2a146485d8045103cd99533 (patch)
treee060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ada/namet.h
parentf10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff)
parent104c05c5284b7822d770ee51a7d91946c7e56d50 (diff)
downloadgcc-e252b51ccde010cbd2a146485d8045103cd99533.zip
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ada/namet.h')
-rw-r--r--gcc/ada/namet.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/gcc/ada/namet.h b/gcc/ada/namet.h
index 1bc20c0..09fa264 100644
--- a/gcc/ada/namet.h
+++ b/gcc/ada/namet.h
@@ -6,7 +6,7 @@
* *
* C Header File *
* *
- * Copyright (C) 1992-2020, Free Software Foundation, Inc. *
+ * Copyright (C) 1992-2021, 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- *
@@ -32,26 +32,28 @@
extern "C" {
#endif
-/* Structure defining a names table entry. */
-
+/* Structure defining a name table entry. */
struct Name_Entry
{
- Int Name_Chars_Index; /* Starting location of char in Name_Chars table. */
- Short Name_Len; /* Length of this name in characters. */
- Byte Byte_Info; /* Byte value associated with this name */
- Byte Spare; /* Unused */
- Name_Id Hash_Link; /* Link to next entry in names table for same hash
- code. Not accessed by C routines. */
- Int Int_Info; /* Int value associated with this name */
+ Int Name_Chars_Index;
+ Short Name_Len;
+ Byte Byte_Info;
+ Byte Name_Has_No_Encodings : 1;
+ Byte Boolean1_Info : 1;
+ Byte Boolean2_Info : 1;
+ Byte Boolean3_Info : 1;
+ Byte Spare : 4;
+ Name_Id Hash_Link;
+ Int Int_Info;
};
-/* Pointer to names table vector. */
+/* Pointer to the name table. */
#define Names_Ptr namet__name_entries__table
-extern struct Name_Entry *Names_Ptr;
+extern struct Name_Entry (*Names_Ptr)[];
-/* Pointer to name characters table. */
+/* Pointer to the name character table. */
#define Name_Chars_Ptr namet__name_chars__table
-extern char *Name_Chars_Ptr;
+extern char (*Name_Chars_Ptr)[];
/* This is Hostparm.Max_Line_Length. */
#define Max_Line_Length (32767 - 1)
@@ -75,12 +77,13 @@ extern struct Bounded_String Global_Name_Buffer;
strings we want are sitting in the name strings table in exactly the form
we need them (NUL terminated), we just point to the name directly. */
-static char *Get_Name_String (Name_Id);
+INLINE char *Get_Name_String (Name_Id);
INLINE char *
Get_Name_String (Name_Id Id)
{
- return Name_Chars_Ptr + Names_Ptr[Id - First_Name_Id].Name_Chars_Index + 1;
+ return
+ &(*Name_Chars_Ptr)[(*Names_Ptr)[Id - First_Name_Id].Name_Chars_Index + 1];
}
#define Name_Equals namet__name_equals