Commit 9780c24f by Jason Merrill Committed by Jason Merrill

xref.c: Remove.

        * xref.c: Remove.
        * Make-lang.in (CXX_OBJS): Remove cp/xref.o
        (cp/xref.o): Remove dependencies.
        * class.c (finish_struct_1, check_methods): Don't call xref fns.
        (finish_struct_1): Likewise.
        * friend.c (make_friend_class): Likewise.
        * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
        * spew.c (read_process_identifier): Likewise.

From-SVN: r49472
parent fecaac37
2002-02-03 Jason Merrill <jason@redhat.com>
* xref.c: Remove.
* Make-lang.in (CXX_OBJS): Remove cp/xref.o
(cp/xref.o): Remove dependencies.
* class.c (finish_struct_1, check_methods): Don't call xref fns.
(finish_struct_1): Likewise.
* friend.c (make_friend_class): Likewise.
* lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
* spew.c (read_process_identifier): Likewise.
2002-02-01 Jason Merrill <jason@redhat.com>
PR c++/4872
......
......@@ -102,7 +102,7 @@ CXX_C_OBJS = attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o \
CXX_OBJS = cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o \
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \
cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/xref.o cp/repo.o cp/dump.o \
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o \
cp/optimize.o cp/mangle.o cp/cp-lang.o
# Use loose warnings for this front end.
......@@ -280,7 +280,6 @@ cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
cp/cfns.h $(EXPR_H) libfuncs.h cp/decl.h $(OBSTACK_H)
cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \
except.h $(TM_P_H)
cp/xref.o: cp/xref.c $(CXX_TREE_H) input.h toplev.h
cp/pt.o: cp/pt.c $(CXX_TREE_H) cp/decl.h cp/parse.h cp/lex.h toplev.h \
$(GGC_H) $(RTL_H) except.h tree-inline.h
cp/error.o: cp/error.c $(CXX_TREE_H) toplev.h diagnostic.h flags.h real.h
......
......@@ -3284,8 +3284,6 @@ check_field_decls (t, access_decls, empty_p,
tree x = *field;
tree type = TREE_TYPE (x);
GNU_xref_member (current_class_name, x);
next = &TREE_CHAIN (x);
if (TREE_CODE (x) == FIELD_DECL)
......@@ -3925,8 +3923,6 @@ check_methods (t)
for (x = TYPE_METHODS (t); x; x = TREE_CHAIN (x))
{
GNU_xref_member (current_class_name, x);
/* If this was an evil function, don't keep it in class. */
if (DECL_ASSEMBLER_NAME_SET_P (x)
&& IDENTIFIER_ERROR_LOCUS (DECL_ASSEMBLER_NAME (x)))
......@@ -5049,8 +5045,6 @@ finish_struct_1 (t)
return;
}
GNU_xref_decl (current_function_decl, t);
/* If this type was previously laid out as a forward reference,
make sure we lay it out again. */
TYPE_SIZE (t) = NULL_TREE;
......
......@@ -932,10 +932,6 @@ extern int flag_no_gnu_keywords;
extern int flag_operator_names;
/* For cross referencing. */
extern int flag_gnu_xref;
/* For environments where you can use GNU binutils (as, ld in particular). */
extern int flag_gnu_binutils;
......@@ -4370,20 +4366,6 @@ extern void check_for_new_type PARAMS ((const char *, flagged_type_tree));
extern tree add_exception_specifier PARAMS ((tree, tree, int));
extern tree merge_exception_specifiers PARAMS ((tree, tree));
/* in xref.c */
extern void GNU_xref_begin PARAMS ((const char *));
extern void GNU_xref_end PARAMS ((int));
extern void GNU_xref_file PARAMS ((const char *));
extern void GNU_xref_start_scope PARAMS ((HOST_WIDE_INT));
extern void GNU_xref_end_scope PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT, int, int));
extern void GNU_xref_ref PARAMS ((tree, const char *));
extern void GNU_xref_decl PARAMS ((tree, tree));
extern void GNU_xref_call PARAMS ((tree, const char *));
extern void GNU_xref_function PARAMS ((tree, tree));
extern void GNU_xref_assign PARAMS ((tree));
extern void GNU_xref_hier PARAMS ((tree, tree, int, int, int));
extern void GNU_xref_member PARAMS ((tree, tree));
/* in mangle.c */
extern void init_mangle PARAMS ((void));
extern void mangle_decl PARAMS ((tree));
......
......@@ -842,7 +842,6 @@ pushlevel (tag_transparent)
newlevel = make_binding_level ();
push_binding_level (newlevel, tag_transparent, keep_next_level_flag);
GNU_xref_start_scope ((size_t) newlevel);
keep_next_level_flag = 0;
}
......@@ -1301,11 +1300,6 @@ poplevel (keep, reverse, functionbody)
rather than the end. This hack is no longer used. */
my_friendly_assert (keep == 0 || keep == 1, 0);
GNU_xref_end_scope ((size_t) current_binding_level,
(size_t) current_binding_level->level_chain,
current_binding_level->parm_flag,
current_binding_level->keep);
if (current_binding_level->keep == 1)
keep = 1;
......@@ -1727,11 +1721,6 @@ poplevel_class ()
shadowed = TREE_CHAIN (shadowed))
pop_binding (TREE_PURPOSE (shadowed), TREE_TYPE (shadowed));
GNU_xref_end_scope ((size_t) class_binding_level,
(size_t) class_binding_level->level_chain,
class_binding_level->parm_flag,
class_binding_level->keep);
/* Now, pop out of the binding level which we created up in the
`pushlevel_class' routine. */
#if defined(DEBUG_CP_BINDING_LEVELS)
......@@ -8130,7 +8119,6 @@ cp_finish_decl (decl, init, asmspec_tree, flags)
set_identifier_type_value (DECL_NAME (decl), type);
CLASSTYPE_GOT_SEMICOLON (type) = 1;
}
GNU_xref_decl (current_function_decl, decl);
/* If we have installed this as the canonical typedef for this
type, and that type has not been defined yet, delay emitting
......@@ -8171,8 +8159,6 @@ cp_finish_decl (decl, init, asmspec_tree, flags)
init = check_initializer (decl, init);
maybe_deduce_size_from_array_init (decl, init);
GNU_xref_decl (current_function_decl, decl);
/* Add this declaration to the statement-tree. This needs to happen
after the call to check_initializer so that the DECL_STMT for a
reference temp is added before the DECL_STMT for the reference itself. */
......@@ -12914,7 +12900,8 @@ xref_tag_from_type (old, id, globalize)
void
xref_basetypes (code_type_node, name, ref, binfo)
tree code_type_node;
tree name, ref;
tree name ATTRIBUTE_UNUSED;
tree ref;
tree binfo;
{
/* In the declaration `A : X, Y, ... Z' we mark all the types
......@@ -12985,8 +12972,6 @@ xref_basetypes (code_type_node, name, ref, binfo)
continue;
}
GNU_xref_hier (name, basetype, via_public, via_virtual, 0);
/* This code replaces similar code in layout_basetypes.
We put the complete_type first for implicit `typename'. */
if (!COMPLETE_TYPE_P (basetype)
......@@ -13127,7 +13112,6 @@ start_enum (name)
if (current_class_type)
TREE_ADDRESSABLE (b->tags) = 1;
GNU_xref_decl (current_function_decl, enumtype);
return enumtype;
}
......@@ -13373,10 +13357,7 @@ build_enumerator (name, value, enumtype)
things like `S::i' later.) */
finish_member_declaration (decl);
else
{
pushdecl (decl);
GNU_xref_decl (current_function_decl, decl);
}
pushdecl (decl);
/* Add this enumeration constant to the list for this type. */
TYPE_VALUES (enumtype) = tree_cons (name, decl, TYPE_VALUES (enumtype));
......@@ -14419,11 +14400,6 @@ finish_method (decl)
DECL_CONTEXT (link) = NULL_TREE;
}
GNU_xref_end_scope ((size_t) current_binding_level,
(size_t) current_binding_level->level_chain,
current_binding_level->parm_flag,
current_binding_level->keep);
poplevel (0, 0, 0);
DECL_INITIAL (fndecl) = old_initial;
......
......@@ -1702,8 +1702,6 @@ grokbitfield (declarator, declspecs, width)
return void_type_node;
}
GNU_xref_member (current_class_name, value);
if (TREE_STATIC (value))
{
error ("static member `%D' cannot be a bit-field", value);
......
......@@ -252,8 +252,6 @@ make_friend_class (type, friend_type)
return;
}
GNU_xref_hier (type, friend_type, 0, 0, 1);
if (is_template_friend)
friend_type = CLASSTYPE_TI_TEMPLATE (friend_type);
......
......@@ -263,8 +263,6 @@ cxx_init_options ()
void
cxx_finish ()
{
if (flag_gnu_xref)
GNU_xref_end (errorcount + sorrycount);
c_common_finish ();
}
......@@ -733,8 +731,6 @@ cxx_init (filename)
init_cp_pragma ();
if (flag_gnu_xref)
GNU_xref_begin (filename);
init_repo (filename);
return filename;
......@@ -931,9 +927,6 @@ extract_interface_info ()
interface_only = finfo->interface_only;
interface_unknown = finfo->interface_unknown;
/* This happens to be a convenient place to put this. */
if (flag_gnu_xref) GNU_xref_file (input_filename);
}
/* Return nonzero if S is not considered part of an
......
......@@ -2526,10 +2526,6 @@ genrtl_start_function (fn)
DECL_SAVED_FUNCTION_DATA (fn) = NULL;
}
/* Tell the cross-reference machinery that we're defining this
function. */
GNU_xref_function (fn, DECL_ARGUMENTS (fn));
/* Keep track of how many functions we're presently expanding. */
++function_depth;
......
......@@ -221,16 +221,11 @@ read_process_identifier (pyylval)
case RID_NOT_EQ: pyylval->code = NE_EXPR; return EQCOMPARE;
default:
if (C_RID_YYCODE (id) == TYPESPEC)
GNU_xref_ref (current_function_decl, IDENTIFIER_POINTER (id));
pyylval->ttype = ridpointers[C_RID_CODE (id)];
return C_RID_YYCODE (id);
}
}
GNU_xref_ref (current_function_decl, IDENTIFIER_POINTER (id));
/* Make sure that user does not collide with our internal naming
scheme. This is not necessary if '.' is used to remove them from
the user's namespace, but is if '$' or double underscores are. */
......
......@@ -3013,10 +3013,6 @@ build_function_call_real (function, params, require_complete, flags)
name = DECL_NAME (function);
assembler_name = DECL_ASSEMBLER_NAME (function);
GNU_xref_call (current_function_decl,
IDENTIFIER_POINTER (name ? name
: TYPE_IDENTIFIER (DECL_CLASS_CONTEXT
(function))));
mark_used (function);
fndecl = function;
......@@ -5748,8 +5744,6 @@ build_modify_expr (lhs, modifycode, rhs)
if (!lvalue_or_else (lhs, "assignment"))
return error_mark_node;
GNU_xref_assign (lhs);
/* Warn about modifying something that is `const'. Don't warn if
this is initialization. */
if (modifycode != INIT_EXPR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment