diff options
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r-- | gcc/ada/sinfo.adb | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index b7bf39e94cb..2baa94b7d3a 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -2192,6 +2192,14 @@ package body Sinfo is return List2 (N); end Pragma_Argument_Associations; + function Pragma_Identifier + (N : Node_Id) return Node_Id is + begin + pragma Assert (False + or else NT (N).Nkind = N_Pragma); + return Node4 (N); + end Pragma_Identifier; + function Pragmas_After (N : Node_Id) return List_Id is begin @@ -4915,6 +4923,14 @@ package body Sinfo is Set_List2_With_Parent (N, Val); end Set_Pragma_Argument_Associations; + procedure Set_Pragma_Identifier + (N : Node_Id; Val : Node_Id) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Pragma); + Set_Node4_With_Parent (N, Val); + end Set_Pragma_Identifier; + procedure Set_Pragmas_After (N : Node_Id; Val : List_Id) is begin @@ -5558,4 +5574,120 @@ package body Sinfo is UI_From_Int (Int (S) - Int (Sloc (N)))); end Set_End_Location; + -------------------------------- + -- Node_Kind Membership Tests -- + -------------------------------- + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2; + end Nkind_In; + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2 or else + T = V3; + end Nkind_In; + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2 or else + T = V3 or else + T = V4; + end Nkind_In; + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2 or else + T = V3 or else + T = V4 or else + T = V5; + end Nkind_In; + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind; + V6 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2 or else + T = V3 or else + T = V4 or else + T = V5 or else + T = V6; + end Nkind_In; + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind; + V6 : Node_Kind; + V7 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2 or else + T = V3 or else + T = V4 or else + T = V5 or else + T = V6 or else + T = V7; + end Nkind_In; + + function Nkind_In + (T : Node_Kind; + V1 : Node_Kind; + V2 : Node_Kind; + V3 : Node_Kind; + V4 : Node_Kind; + V5 : Node_Kind; + V6 : Node_Kind; + V7 : Node_Kind; + V8 : Node_Kind) return Boolean + is + begin + return T = V1 or else + T = V2 or else + T = V3 or else + T = V4 or else + T = V5 or else + T = V6 or else + T = V7 or else + T = V8; + end Nkind_In; + end Sinfo; |