summaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-10 23:56:31 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-10 23:56:31 +0000
commit62bf98ad50c43721cee97c06ce558fcaee7cef93 (patch)
tree3e13669d72ea210ff0fa0fd5c941453f47b0432e /gcc/c-lex.c
parent490eec42c79a8ba479de077423c01637480bc80a (diff)
downloadgcc-62bf98ad50c43721cee97c06ce558fcaee7cef93.tar.gz
* c-common.h (struct c_fileinfo): Comment moved here from cp-tree.h.
(extract_interface_info): Delete prototype. * c-decl.c (extract_interface_info): Delete stub. * c-lex.c (get_fileinfo): Initialize file_info_tree here, if it's not already been done ... (init_c_lex): ... not here. (fe_file_change): Don't call extract_interface_info. cp: * cp-tree.h (interface_only, interface_unknown): Delete declarations; comment explaining them moved to c-common.h. * lex.c (interface_only, interface_unknown, extract_interface_info): Delete definitions. (cxx_finish): Don't reset interface_unknown. (handle_pragma_interface): Don't set interface_only and interface_unknown; just the like-named fields in finfo. (handle_pragma_implementation): Adjust comment. * decl2.c (cp_finish_file): Don't reset interface_only and interface_unknown. * method.c (synthesize_method): Don't reset interface_unknown or call extract_interface_info. * pt.c (pop_tinst_level): Don't call extract_interface_info. * decl.c (start_cleanup_fn): Don't save or restore interface_only and interface_unknown. (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename and use the result instead of the interface_only/interface_unknown globals. (start_preparsed_function): Likewise. * lex.c (cxx_make_type): Likewise. * semantics.c (begin_class_definition): Likewise. (expand_body): Don't call extract_interface_info. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index 6334885f0a3..5a2d947be05 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -82,10 +82,8 @@ init_c_lex (void)
struct cpp_callbacks *cb;
struct c_fileinfo *toplevel;
- /* Set up filename timing. Must happen before cpp_read_main_file. */
- file_info_tree = splay_tree_new ((splay_tree_compare_fn)strcmp,
- 0,
- (splay_tree_delete_value_fn)free);
+ /* The get_fileinfo data structure must be initialized before
+ cpp_read_main_file is called. */
toplevel = get_fileinfo ("<top level>");
if (flag_detailed_statistics)
{
@@ -118,6 +116,11 @@ get_fileinfo (const char *name)
splay_tree_node n;
struct c_fileinfo *fi;
+ if (!file_info_tree)
+ file_info_tree = splay_tree_new ((splay_tree_compare_fn)strcmp,
+ 0,
+ (splay_tree_delete_value_fn)free);
+
n = splay_tree_lookup (file_info_tree, (splay_tree_key) name);
if (n)
return (struct c_fileinfo *) n->value;
@@ -266,9 +269,6 @@ fe_file_change (const struct line_map *new_map)
input_filename = new_map->to_file;
input_line = new_map->to_line;
#endif
-
- /* Hook for C++. */
- extract_interface_info ();
}
static void