aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_case.ads
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/sem_case.ads
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/sem_case.ads')
-rw-r--r--gcc/ada/sem_case.ads20
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ada/sem_case.ads b/gcc/ada/sem_case.ads
index 16fa243..3943cf2 100644
--- a/gcc/ada/sem_case.ads
+++ b/gcc/ada/sem_case.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1996-2020, Free Software Foundation, Inc. --
+-- Copyright (C) 1996-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- --
@@ -44,8 +44,8 @@
-- till the freeze point in this case.
-- 3. Set the Others_Discrete_Choices list for an others choice. This is
--- used in various ways, e.g. to construct the disriminant checking function
--- for the case of a variant with an others choice.
+-- used in various ways, e.g. to construct the discriminant checking
+-- function for the case of a variant with an others choice.
-- 4. In the case of static predicates, we need to expand out choices that
-- correspond to the predicate for the back end. This expansion destroys
@@ -125,10 +125,10 @@ package Sem_Case is
package Generic_Check_Choices is
procedure Check_Choices
- (N : Node_Id;
- Alternatives : List_Id;
- Subtyp : Entity_Id;
- Others_Present : out Boolean);
+ (N : Node_Id;
+ Alternatives : List_Id;
+ Subtyp : Entity_Id;
+ Others_Present : out Boolean);
-- From a case expression, case statement, or record variant N, this
-- routine analyzes the corresponding list of discrete choices which
-- appear in each element of the list Alternatives (for the variant
@@ -147,4 +147,10 @@ package Sem_Case is
-- the parent node (N_Variant, N_Case_Expression/Statement_Alternative).
end Generic_Check_Choices;
+
+ function Is_Case_Choice_Pattern (Expr : Node_Id) return Boolean;
+ -- GNAT language extensions allow casing on a non-discrete value, with
+ -- patterns as case choices. Return True iff Expr is such a pattern, or
+ -- a subexpression thereof.
+
end Sem_Case;