summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_cg.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 16:41:21 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-09-10 16:41:21 +0200
commite1d9659dd302e125682c6ed7d5c613c7a1cbefdc (patch)
tree9cb2b579aa839975138da83d1ecbd610d043dbc7 /gcc/ada/exp_cg.adb
parentcd9909a0c90962131d6b58d0af701f6333ecd244 (diff)
downloadgcc-e1d9659dd302e125682c6ed7d5c613c7a1cbefdc.tar.gz
[multiple changes]
2010-09-10 Robert Dewar <dewar@adacore.com> * errout.adb: Remove tests of Parsing_Main_Subunit, since this test is now done in In_Extended_Main_Source_Unit. * errout.ads (Compiler_State[_Type]): Moved from Errout to Lib (Parsing_Main_Subunit): Moved from Errout to Lib and renamed as Parsing_Main_Extended_Source. * frontend.adb: Set Parsing_Main_Extended_Source True for parsing main unit. * lib-load.adb (Load_Unit): Add PMES parameter Set PMES appropriately in all calls to Load_Unit * lib-load.ads (Load_Unit): Add PMES parameter * lib.adb (In_Extended_Main_Source_Unit): When called with Compiler_State set to Parsing, test new flag Compiling_Main_Extended_Source. * lib.ads (Compiler_State[_Type]): Moved from Errout to Lib (Parsing_Main_Subunit): Moved from Errout to Lib and renamed as Parsing_Main_Extended_Source * par-load.adb (Load): Set PMES properly in call to Load_Unit 2010-09-10 Ed Schonberg <schonberg@adacore.com> * exp_cg.adb: Use proper entity to handle overloads. * sem_res.adb (Check_Parameterless_Call): An operator node without actuals cannot be a call, and must be treated as a string. From-SVN: r164182
Diffstat (limited to 'gcc/ada/exp_cg.adb')
-rw-r--r--gcc/ada/exp_cg.adb14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/exp_cg.adb b/gcc/ada/exp_cg.adb
index 425ae540526..31baa40168b 100644
--- a/gcc/ada/exp_cg.adb
+++ b/gcc/ada/exp_cg.adb
@@ -426,7 +426,19 @@ package body Exp_CG is
begin
Write_Str ("edge: { sourcename: ");
Write_Char ('"');
- Get_External_Name (Defining_Entity (P), Has_Suffix => False);
+
+ -- The parent node is the construct that contains the call: subprogram
+ -- body or library-level package. Display the qualified name of the
+ -- entity of the construct. For a subprogram, it is the entity of the
+ -- spec, which carries a homonym counter when it is overloaded.
+
+ if Nkind (P) = N_Subprogram_Body then
+ Get_External_Name (Corresponding_Spec (P), Has_Suffix => False);
+
+ else
+ Get_External_Name (Defining_Entity (P), Has_Suffix => False);
+ end if;
+
Write_Str (Name_Buffer (1 .. Name_Len));
if Nkind (P) = N_Package_Declaration then