diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 17:08:15 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-05 17:08:15 +0200 |
commit | 7c62a85a8dcec50e474c02525c5f165ad30cf2d9 (patch) | |
tree | 737eee92b2b21ab528f2d75e8945e71bb4885eb4 /gcc/ada/lib-xref-alfa.adb | |
parent | e49208a9cb1d63270a57c501eb94cce668d2c750 (diff) | |
download | gcc-7c62a85a8dcec50e474c02525c5f165ad30cf2d9.zip gcc-7c62a85a8dcec50e474c02525c5f165ad30cf2d9.tar.gz gcc-7c62a85a8dcec50e474c02525c5f165ad30cf2d9.tar.bz2 |
[multiple changes]
2011-08-05 Pascal Obry <obry@adacore.com>
* a-iteint.ads: Fix copyright year.
2011-08-05 Thomas Quinot <quinot@adacore.com>
* par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
statement SCO for a USE clause or a representation clause.
2011-08-05 Yannick Moy <moy@adacore.com>
* lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
between body and spec for stub.
(Detect_And_Add_ALFA_Scope): take into account subprogram stub
* lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
pragma precondition or postcondition, for which the enclosing
subprogram or package in the AST is not the desired one, return empty.
From-SVN: r177450
Diffstat (limited to 'gcc/ada/lib-xref-alfa.adb')
-rw-r--r-- | gcc/ada/lib-xref-alfa.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ada/lib-xref-alfa.adb b/gcc/ada/lib-xref-alfa.adb index 7c2d275..526fdb7 100644 --- a/gcc/ada/lib-xref-alfa.adb +++ b/gcc/ada/lib-xref-alfa.adb @@ -845,6 +845,9 @@ package body ALFA is if Present (Body_Entity) then if Nkind (Body_Entity) = N_Defining_Program_Unit_Name then Body_Entity := Parent (Body_Entity); + elsif Nkind (Body_Entity) = N_Subprogram_Body_Stub then + Body_Entity := + Proper_Body (Unit (Library_Unit (Body_Entity))); end if; Spec_Entity := Corresponding_Spec (Body_Entity); @@ -874,10 +877,12 @@ package body ALFA is procedure Detect_And_Add_ALFA_Scope (N : Node_Id) is begin - if Nkind_In (N, N_Subprogram_Declaration, - N_Subprogram_Body, - N_Package_Declaration, - N_Package_Body) + if Nkind_In (N, + N_Subprogram_Declaration, + N_Subprogram_Body, + N_Subprogram_Body_Stub, + N_Package_Declaration, + N_Package_Body) then Add_ALFA_Scope (N); end if; |