diff options
author | 2004-11-10 14:44:29 -0700 | |
---|---|---|
committer | 2005-04-07 21:04:18 -0700 | |
commit | 3451bba63ee2d5617cde1e6956d0a39ac9ca21a0 (patch) | |
tree | c607e4551fa99d8f31fd4e5ea2853a9be06cf204 /compile.c | |
parent | When showing symbol pseudos, show the symbol pointer too, not just the name. (diff) | |
download | sparse-3451bba63ee2d5617cde1e6956d0a39ac9ca21a0.tar.gz sparse-3451bba63ee2d5617cde1e6956d0a39ac9ca21a0.tar.bz2 sparse-3451bba63ee2d5617cde1e6956d0a39ac9ca21a0.zip |
Make "translation_unit()" do symbol evaluation too.
Not only do all users want it, the list of used symbols
is not stable until after the tree has been evaluated.
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -29,7 +29,6 @@ static void clean_up_symbols(struct symbol_list *list) struct symbol *sym; FOR_EACH_PTR(list, sym) { - evaluate_symbol(sym); expand_symbol(sym); emit_one_symbol(sym); } END_FOR_EACH_PTR(sym); @@ -40,6 +39,7 @@ int main(int argc, char **argv) int fd; char *basename, *filename = NULL, **args; struct token *token; + struct symbol_list *list; // Initialize symbol stream first, so that we can add defines etc init_symbols(); @@ -93,11 +93,11 @@ int main(int argc, char **argv) token = preprocess(token); // Parse the resulting C code - translation_unit(token, &used_list); + list = translation_unit(token); // Do type evaluation and simplification emit_unit_begin(basename); - clean_up_symbols(used_list); + clean_up_symbols(list); emit_unit_end(); #if 0 |