From 5afe5d2d4485638a63fa23f456eb6942f2e5bd38 Mon Sep 17 00:00:00 2001 From: Hristian Kirtchev Date: Wed, 24 Apr 2013 13:15:27 +0000 Subject: exp_ch6.adb: Remove with and use clause for Sem_Prag. 2013-04-24 Hristian Kirtchev * 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 --- gcc/ada/sem_prag.ads | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gcc/ada/sem_prag.ads') 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 -- cgit v1.1