diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2013-04-24 13:15:27 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-04-24 15:15:27 +0200 |
commit | 5afe5d2d4485638a63fa23f456eb6942f2e5bd38 (patch) | |
tree | ca637ecaa92b39893b465fad03a54cfe9788db99 /gcc/ada/sem_prag.ads | |
parent | f1c80977503ef50a812c3545c9b902fd65c086eb (diff) | |
download | gcc-5afe5d2d4485638a63fa23f456eb6942f2e5bd38.zip gcc-5afe5d2d4485638a63fa23f456eb6942f2e5bd38.tar.gz gcc-5afe5d2d4485638a63fa23f456eb6942f2e5bd38.tar.bz2 |
exp_ch6.adb: Remove with and use clause for Sem_Prag.
2013-04-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch6.adb: Remove with and use clause for Sem_Prag.
(Freeze_Subprogram): Call Analyze_Subprogram_Contract to analyze
the contract of a subprogram.
* sem_ch3.adb: Remove with and use clause for Sem_Prag.
(Analyze_Declarations): Call Analyze_Subprogram_Contract to
analyze the contract of a subprogram.
* sem_ch6.adb (Analyze_Subprogram_Contract): New routine.
(Check_Subprogram_Contract): Removed.
* sem_ch6.ads (Analyze_Subprogram_Contract): New routine.
(Check_Subprogram_Contract): Removed.
(Expand_Contract_Cases): Add a guard against malformed contract cases.
* sem_ch13.adb (Analyze_Aspect_Specifications): Call
Decorate_Delayed_Aspect_And_Pragma to decorate aspects
Contract_Cases, Depends and Global. Reimplement the analysis of
aspect Contract_Cases.
(Decorate_Delayed_Aspect_And_Pragma): New routine.
* sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): New routine.
(Analyze_CTC_In_Decl_Part): Removed.
(Analyze_Pragma): Reimplement the analysis of pragma Contract_Cases.
(Analyze_Test_Case_In_Decl_Part): New routine.
(Find_Related_Subprogram): New routine.
(Requires_Profile_Installation): Add new formal Prag. Update
the logic to take into account the origin of the pragma.
* sem_prag.ads (Analyze_Contract_Cases_In_Decl_Part): New routine.
(Analyze_CTC_In_Decl_Part): Removed.
(Analyze_Test_Case_In_Decl_Part): New routine.
From-SVN: r198227
Diffstat (limited to 'gcc/ada/sem_prag.ads')
-rw-r--r-- | gcc/ada/sem_prag.ads | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads index 5bf118a..3b8a3bc 100644 --- a/gcc/ada/sem_prag.ads +++ b/gcc/ada/sem_prag.ads @@ -38,13 +38,8 @@ package Sem_Prag is procedure Analyze_Pragma (N : Node_Id); -- Analyze procedure for pragma reference node N - procedure Analyze_CTC_In_Decl_Part (N : Node_Id; S : Entity_Id); - -- Special analyze routine for contract-case and test-case pragmas that - -- appears within a declarative part where the pragma is associated with - -- a subprogram specification. N is the pragma node, and S is the entity - -- for the related subprogram. This procedure does a preanalysis of the - -- expressions in the pragma as "spec expressions" (see section in Sem - -- "Handling of Default and Per-Object Expressions..."). + procedure Analyze_Contract_Cases_In_Decl_Part (N : Node_Id); + -- Perform full analysis and expansion of delayed pragma Contract_Cases procedure Analyze_Depends_In_Decl_Part (N : Node_Id); -- Perform full analysis of delayed pragma Depends @@ -60,6 +55,14 @@ package Sem_Prag is -- of the expressions in the pragma as "spec expressions" (see section -- in Sem "Handling of Default and Per-Object Expressions..."). + procedure Analyze_Test_Case_In_Decl_Part (N : Node_Id; S : Entity_Id); + -- Special analyze routine for contract-case and test-case pragmas that + -- appears within a declarative part where the pragma is associated with + -- a subprogram specification. N is the pragma node, and S is the entity + -- for the related subprogram. This procedure does a preanalysis of the + -- expressions in the pragma as "spec expressions" (see section in Sem + -- "Handling of Default and Per-Object Expressions..."). + function Check_Kind (Nam : Name_Id) return Name_Id; -- This function is used in connection with pragmas Assert, Check, -- and assertion aspects and pragmas, to determine if Check pragmas |