diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-31 10:52:34 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-31 10:52:34 +0200 |
commit | d2b4b3da0d21bea1af905d255971a4869b5617cc (patch) | |
tree | 0c2f94cab822bc88416087991bfbbfc801389ebd /gcc/ada/lib-xref-alfa.adb | |
parent | 16c3301a61b99c5e55c90f3fa73d83c9478798d9 (diff) | |
download | gcc-d2b4b3da0d21bea1af905d255971a4869b5617cc.zip gcc-d2b4b3da0d21bea1af905d255971a4869b5617cc.tar.gz gcc-d2b4b3da0d21bea1af905d255971a4869b5617cc.tar.bz2 |
[multiple changes]
2011-08-31 Yannick Moy <moy@adacore.com>
* sem_ch4.adb: Code clean up.
2011-08-31 Yannick Moy <moy@adacore.com>
* exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
and TSS primitive Finalize_Address if finalization is suppressed.
(Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
primitive Finalize_Address if finalization is suppressed.
2011-08-31 Jose Ruiz <ruiz@adacore.com>
* s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
sure that the underlying task has already been created before trying
to change its affinity.
(Set_CPU): Use the term processor instead of CPU, as we do in
Assign_Task.
2011-08-31 Vincent Celier <celier@adacore.com>
* prj-attr.adb: New Compiler attribute Source_File_Switches.
* prj-nmsc.adb (Process_Compiler): Process attribute
Source_File_Switches.
* prj.ads (Language_Config): New name list component
Name_Source_File_Switches.
* snames.ads-tmpl (Name_Source_File_Switches): New standard name.
2011-08-31 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
discriminated component of an actual, expand at once to prevent
ouf-of-order references with generated subtypes.
2011-08-31 Yannick Moy <moy@adacore.com>
* lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
reference to operator in Alfa xrefs.
2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
where the parent instance was frozen before the current instance due to
the presence of a source body. Update calls to Insert_After_Last_Decl.
(Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
Update the comment which illustrates the purpose of the routine.
Package instances are now frozen by source bodies which appear after
the instance. This ensures that entities coming from within the
instance are available for use in the said bodies.
(Install_Body): Add code to handle the case where the parent instance
was frozen before the current instance due to the presence of a source
body. Update calls to Insert_After_Last_Decl.
From-SVN: r178360
Diffstat (limited to 'gcc/ada/lib-xref-alfa.adb')
-rw-r--r-- | gcc/ada/lib-xref-alfa.adb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/lib-xref-alfa.adb b/gcc/ada/lib-xref-alfa.adb index 9cb28fd..6f1f393 100644 --- a/gcc/ada/lib-xref-alfa.adb +++ b/gcc/ada/lib-xref-alfa.adb @@ -576,6 +576,11 @@ package body Alfa is Eliminate_Before_Sort : declare NR : Nat; + function Is_Alfa_Reference + (E : Entity_Id; + Typ : Character) return Boolean; + -- Return whether the reference is adequate for this entity + function Is_Alfa_Scope (E : Entity_Id) return Boolean; -- Return whether the entity or reference scope is adequate @@ -583,6 +588,25 @@ package body Alfa is -- Return True if E is a global constant for which we should ignore -- reads in Alfa. + ----------------------- + -- Is_Alfa_Reference -- + ----------------------- + + function Is_Alfa_Reference + (E : Entity_Id; + Typ : Character) return Boolean is + begin + -- The only references of interest on callable entities are calls. + -- On non-callable entities, the only references of interest are + -- reads and writes. + + if Ekind (E) in Overloadable_Kind then + return Typ = 's'; + else + return Typ = 'r' or else Typ = 'm'; + end if; + end Is_Alfa_Reference; + ------------------- -- Is_Alfa_Scope -- ------------------- @@ -617,6 +641,8 @@ package body Alfa is and then Is_Alfa_Scope (Xrefs.Table (Rnums (J)).Ent_Scope) and then Is_Alfa_Scope (Xrefs.Table (Rnums (J)).Ref_Scope) and then not Is_Global_Constant (Xrefs.Table (Rnums (J)).Ent) + and then Is_Alfa_Reference (Xrefs.Table (Rnums (J)).Ent, + Xrefs.Table (Rnums (J)).Typ) then Nrefs := Nrefs + 1; Rnums (Nrefs) := Rnums (J); |