summaryrefslogtreecommitdiff
path: root/gcc/ada/lib-load.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-22 10:11:00 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-22 10:11:00 +0000
commitdb317bdbca5dc958df19cd7315ef3b1836193b02 (patch)
treeefe68ba58667e8b31a2bb078cde6c3002d8fe676 /gcc/ada/lib-load.ads
parent1c3efe5ceaa7b9714778941477f45544c92e98ee (diff)
downloadgcc-db317bdbca5dc958df19cd7315ef3b1836193b02.tar.gz
2009-04-22 Ed Schonberg <schonberg@adacore.com>
* lib-load.ads, lib-load.adb (Make_Child_Decl_Unit): New subprogram, to create a unit table entry for the subprogram declaration created for a child suprogram body that has no separate specification. * sem_ch10.adb (Analyze_Compilation_Unit): For a child unit that is a subprogram body, call Make_Child_Decl_Unit. * lib.adb (Get_Cunit_Unit_Number): Verify that an entry not yet in the table can only be the created specification of a child subprogram body that is the main unit, which has not been entered in the table yet. * errout.adb (Output_Messages): Ignore created specification of a child subprogram body to prevent repeated listing of error messages. * gnat1drv.adb (gnat1drv): The generated specification for a child subprogram body does not generate code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146559 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/lib-load.ads')
-rw-r--r--gcc/ada/lib-load.ads6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/lib-load.ads b/gcc/ada/lib-load.ads
index fe1fd6eaeb2..97abc71473a 100644
--- a/gcc/ada/lib-load.ads
+++ b/gcc/ada/lib-load.ads
@@ -169,6 +169,12 @@ package Lib.Load is
-- creates a dummy package unit so that compilation can continue without
-- blowing up when the missing unit is referenced.
+ procedure Make_Child_Decl_Unit (N : Node_Id);
+ -- For a child subprogram body without a spec, we create a subprogram
+ -- declaration in order to attach the required parent link. We create
+ -- a Units_Table entry for this declaration, in order to maintain a
+ -- one-to-one correspondence between compilation units and table entries.
+
procedure Make_Instance_Unit (N : Node_Id; In_Main : Boolean);
-- When a compilation unit is an instantiation, it contains both the
-- declaration and the body of the instance, each of which can have its