On Wed, Jul 06, 2005 at 08:32:38AM -0400, Michael Tegtmeyer wrote: > Is there existing functionality somewhere to sweep a function and collect > all externally visible variables at the tree level or do I need to roll my > own? I've looked in tree.h and grepped around as much as I could but I > haven't found anything obvious. > Referenced variables are collected by tree-dfa.c:find_referenced_vars. Once collected, you can distinguish locals from globals with is_global_var().
Diego.