aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-10 14:44:29 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:04:18 -0700
commit3451bba63ee2d5617cde1e6956d0a39ac9ca21a0 (patch)
treec607e4551fa99d8f31fd4e5ea2853a9be06cf204 /compile.c
parentWhen showing symbol pseudos, show the symbol pointer too, not just the name. (diff)
downloadsparse-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 0aa46a2..2996465 100644
--- a/compile.c
+++ b/compile.c
@@ -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