-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- creates a dummy package unit so that compilation can continue without
-- blowing up when the missing unit is referenced.
- procedure Make_Instance_Unit (N : Node_Id);
+ 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
-- own elaboration routine. The file itself corresponds to the declaration.
-- We create an additional entry for the body, so that the binder can
-- generate the proper elaboration calls to both. The argument N is the
-- compilation unit node created for the body.
+ --
+ -- If the instance is not the main program, we still generate the instance
+ -- body even though we do not generate code for it. In that case we still
+ -- generate a compilation unit node for it, and we need to make an entry
+ -- for it in the units table, so as to maintain a one-to-one mapping
+ -- between table and nodes. The table entry is used among other things to
+ -- provide a canonical traversal order for context units for Inspector.
+ -- The flag In_Main indicates whether the instance is the main unit.
procedure Version_Update (U : Node_Id; From : Node_Id);
-- This routine is called when unit U is found to be semantically