From: Pierre-Marie de Rodat <derodat@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Kenner <kenner@adacore.com>
Subject: [Ada] Add Void_Or_Type_Kind and Exception_Or_Object_Kind
Date: Tue, 6 Jul 2021 14:48:16 +0000 [thread overview]
Message-ID: <20210706144816.GA2250294@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 250 bytes --]
To be used in GNAT LLVM as declarations for parameters and variables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-types.ads (Void_Or_Type_Kind,
Exception_Or_Object_Kind): Declare.
* gen_il-gen-gen_entities.adb: Likewise.
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 2374 bytes --]
diff --git a/gcc/ada/gen_il-gen-gen_entities.adb b/gcc/ada/gen_il-gen-gen_entities.adb
--- a/gcc/ada/gen_il-gen-gen_entities.adb
+++ b/gcc/ada/gen_il-gen-gen_entities.adb
@@ -238,7 +238,9 @@ begin -- Gen_IL.Gen.Gen_Entities
Sm (Warnings_Off_Used_Unreferenced, Flag),
Sm (Was_Hidden, Flag)));
- Cc (E_Void, Entity_Kind,
+ Ab (Void_Or_Type_Kind, Entity_Kind);
+
+ Cc (E_Void, Void_Or_Type_Kind,
-- The initial Ekind value for a newly created entity. Also used as the
-- Ekind for Standard_Void_Type, a type entity in Standard used as a
-- dummy type for the return type of a procedure (the reason we create
@@ -300,7 +302,9 @@ begin -- Gen_IL.Gen.Gen_Entities
-- but not getters; the Ekind is modified before any such getters are
-- called.
- Ab (Object_Kind, Entity_Kind,
+ Ab (Exception_Or_Object_Kind, Entity_Kind);
+
+ Ab (Object_Kind, Exception_Or_Object_Kind,
(Sm (Current_Value, Node_Id),
Sm (Renamed_Or_Alias, Node_Id)));
@@ -452,7 +456,7 @@ begin -- Gen_IL.Gen.Gen_Entities
Cc (E_Named_Real, Named_Kind);
-- Named numbers created by a number declaration with a real value
- Ab (Type_Kind, Entity_Kind,
+ Ab (Type_Kind, Void_Or_Type_Kind,
(Sm (Alignment, Uint),
Sm (Associated_Node_For_Itype, Node_Id),
Sm (Can_Use_Internal_Rep, Flag, Base_Type_Only,
@@ -1177,7 +1181,7 @@ begin -- Gen_IL.Gen.Gen_Entities
-- for the body of a protected entry family.
(Sm (Entry_Index_Constant, Node_Id)));
- Cc (E_Exception, Entity_Kind,
+ Cc (E_Exception, Exception_Or_Object_Kind,
-- An exception created by an exception declaration. The exception
-- itself uses E_Exception for the Ekind, the implicit type that is
-- created to represent its type uses the Ekind E_Exception_Type.
diff --git a/gcc/ada/gen_il-types.ads b/gcc/ada/gen_il-types.ads
--- a/gcc/ada/gen_il-types.ads
+++ b/gcc/ada/gen_il-types.ads
@@ -140,6 +140,7 @@ package Gen_IL.Types is
Elementary_Kind,
Enumeration_Kind,
Entry_Kind,
+ Exception_Or_Object_Kind,
Fixed_Point_Kind,
Float_Kind,
Formal_Kind,
@@ -166,6 +167,7 @@ package Gen_IL.Types is
Signed_Integer_Kind,
Task_Kind,
Type_Kind,
+ Void_Or_Type_Kind,
-- End of abstract entity types.
reply other threads:[~2021-07-06 14:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210706144816.GA2250294@adacore.com \
--to=derodat@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kenner@adacore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).