This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C identifier lookup speedups, 2/2
On Mon, 2003-04-14 at 13:02, Zack Weinberg wrote:
> Mark Mitchell <mark at codesourcery dot com> writes:
>
> ...
> > + /* Return the DECL giving the global binding (if any) for NAME (an
> > + IDENTIFIER_NODE). */
> > +
> > + static tree
> > + lookup_global_name (tree name)
> > + {
> > + tree decl;
> > +
> > + for (decl = global_binding_level->names; decl; decl = TREE_CHAIN (decl))
> > + if (DECL_NAME (decl) == name)
> > + return decl;
> > +
> > + return NULL_TREE;
> > + }
>
> Can't you use identifier_global_value for this?
Probably; didn't know we had that in C.
I'll make a new patch.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery dot com