diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-18 11:04:34 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-18 11:04:34 +0000 |
commit | 5cf1cbbb008f55be4613a8658a9a8390ac996bbb (patch) | |
tree | 1386817c0243f4f562148895d810773bea01a48e /gcc/ada/sem_aux.adb | |
parent | 0adbccedb7aa45321ef1d4f870278fc0cba6aefb (diff) | |
download | gcc-5cf1cbbb008f55be4613a8658a9a8390ac996bbb.tar.gz |
2014-07-18 Robert Dewar <dewar@adacore.com>
* exp_ch7.adb: Minor reformatting.
2014-07-18 Claire Dross <dross@adacore.com>
* sem_aux.ads (Get_Binary_Nkind): New function that returns
the Node_Kind value of an entity defining a binary operator.
(Get_Unary_Nkind): New function that returns the Node_Kind value
of an entity defining a unary operator.
2014-07-18 Pascal Obry <obry@adacore.com>
* sysdep.c: comment update.
* adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
platforms where it is known to be supported.
2014-07-18 Thomas Quinot <quinot@adacore.com>
* sem_dist.adb (Process_Remote_AST_Declaration): Need
to set Fat_Type's Ekind in order to be able to use its
Corresponding_Remote_Type attribute.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212815 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_aux.adb')
-rw-r--r-- | gcc/ada/sem_aux.adb | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/gcc/ada/sem_aux.adb b/gcc/ada/sem_aux.adb index 3f9522152b6..0344637dccc 100644 --- a/gcc/ada/sem_aux.adb +++ b/gcc/ada/sem_aux.adb @@ -32,7 +32,6 @@ with Atree; use Atree; with Einfo; use Einfo; -with Sinfo; use Sinfo; with Snames; use Snames; with Stand; use Stand; with Uintp; use Uintp; @@ -435,6 +434,52 @@ package body Sem_Aux is return Empty; end First_Tag_Component; + --------------------- + -- Get_Binary_Nkind -- + --------------------- + + function Get_Binary_Nkind (Op : Entity_Id) return Node_Kind is + Name : constant String := Get_Name_String (Chars (Op)); + begin + if Name = "Oadd" then + return N_Op_Add; + elsif Name = "Oconcat" then + return N_Op_Concat; + elsif Name = "Oexpon" then + return N_Op_Expon; + elsif Name = "Osubtract" then + return N_Op_Subtract; + elsif Name = "Omod" then + return N_Op_Mod; + elsif Name = "Omultiply" then + return N_Op_Multiply; + elsif Name = "Odivide" then + return N_Op_Divide; + elsif Name = "Orem" then + return N_Op_Rem; + elsif Name = "Oand" then + return N_Op_And; + elsif Name = "Oeq" then + return N_Op_Eq; + elsif Name = "Oge" then + return N_Op_Ge; + elsif Name = "Ogt" then + return N_Op_Gt; + elsif Name = "Ole" then + return N_Op_Le; + elsif Name = "Olt" then + return N_Op_Lt; + elsif Name = "One" then + return N_Op_Ne; + elsif Name = "Oxor" then + return N_Op_Or; + elsif Name = "Oor" then + return N_Op_Xor; + else + raise Program_Error; + end if; + end Get_Binary_Nkind; + ------------------ -- Get_Rep_Item -- ------------------ @@ -602,6 +647,26 @@ package body Sem_Aux is return Empty; end Get_Rep_Pragma; + --------------------- + -- Get_Unary_Nkind -- + --------------------- + + function Get_Unary_Nkind (Op : Entity_Id) return Node_Kind is + Name : constant String := Get_Name_String (Chars (Op)); + begin + if Name = "Oabs" then + return N_Op_Abs; + elsif Name = "Osubtract" then + return N_Op_Minus; + elsif Name = "Onot" then + return N_Op_Not; + elsif Name = "Oadd" then + return N_Op_Plus; + else + raise Program_Error; + end if; + end Get_Unary_Nkind; + --------------------------------- -- Has_External_Tag_Rep_Clause -- --------------------------------- |