]> gcc.gnu.org Git - gcc.git/commitdiff
cp-tree.h (back_end_hook): New variable.
authorMark Mitchell <mark@codesourcery.com>
Tue, 17 Aug 1999 23:07:54 +0000 (23:07 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 17 Aug 1999 23:07:54 +0000 (23:07 +0000)
* cp-tree.h (back_end_hook): New variable.
* decl2.c (back_end_hook): Define it.
(finish_file): If it's non-NULL, call it.

From-SVN: r28741

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c

index ee595ab50c00443076fc385139c9320bcc72e91f..86b452ba63b7306b925496c931891b547014abf2 100644 (file)
@@ -1,5 +1,9 @@
 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
 
+       * cp-tree.h (back_end_hook): New variable.
+       * decl2.c (back_end_hook): Define it.
+       (finish_file): If it's non-NULL, call it.
+
        * decl.c (add_decl_to_level): New function.
        (push_local_binding): Use it.
        (find_binding): Fix typo in comment.
index 91ce27299d25d0b0780a3c5fce636ea305350f1c..6c585d4252a0ec00b3edd994f2ebbd3c8585dd52 100644 (file)
@@ -613,6 +613,12 @@ extern int flag_permissive;
 
 extern int flag_access_control;
 
+/* If this variable is defined to a non-NULL value, it will be called
+   after the file has been completely parsed.  The argument will be
+   the GLOBAL_NAMESPACE.  */
+
+extern void (*back_end_hook) PROTO((tree));
+
 \f
 /* C++ language-specific tree codes.  */
 #define DEFTREECODE(SYM, NAME, TYPE, LENGTH) SYM,
index 7e0e23b6a64b3b4146084984e3076832e513d394..7fd9be0be6a2a00f5072bb0366ec5c50d1a3831d 100644 (file)
@@ -476,6 +476,11 @@ int flag_vtable_gc;
 
 int flag_permissive;
 
+/* If this variable is defined to a non-NULL value, it will be called
+   after the file has been completely parsed.  */
+
+void (*back_end_hook) PROTO((tree));
+
 /* Table of language-dependent -f options.
    STRING is the option name.  VARIABLE is the address of the variable.
    ON_VALUE is the value to store in VARIABLE
@@ -3675,6 +3680,11 @@ finish_file ()
   if (flag_dump_translation_unit)
     dump_node_to_file (global_namespace, flag_dump_translation_unit);
 
+  /* If there's some tool that wants to examine the entire translation
+     unit, let it do so now.  */
+  if (back_end_hook)
+    (*back_end_hook) (global_namespace);
+
   this_time = get_run_time ();
   parse_time -= this_time - start_time;
   varconst_time += this_time - start_time;
This page took 0.176186 seconds and 5 git commands to generate.