2 * Example trivial client program that uses the sparse library
5 * Copyright (C) 2003 Transmeta Corp.
7 * Copyright 2003 Jeff Garzik
9 * Licensed under the Open Software License version 1.1
25 #include "expression.h"
28 static void clean_up_symbols(struct symbol_list
*list
)
32 FOR_EACH_PTR(list
, sym
) {
35 } END_FOR_EACH_PTR(sym
);
38 int main(int argc
, char **argv
)
42 clean_up_symbols(sparse_initialize(argc
, argv
));
43 while ((filename
= *argv
) != NULL
) {
44 struct symbol_list
*list
;
45 const char *basename
= strrchr(filename
, '/');
47 filename
= basename
+1;
50 // Do type evaluation and simplification
51 emit_unit_begin(filename
);
52 clean_up_symbols(list
);
57 // And show the allocation statistics
61 show_expression_alloc();
62 show_statement_alloc();