aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/parse.h
diff options
authorAlexander Viro <viro@www.linux.org.uk>2004-09-04 19:45:26 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:03:05 -0700
commitee33e420fcfc7ddb359df8ca79316d8fe2084452 (patch)
tree620c9aa9e90f34a3f4b4e588d732adb8d115f0ec /parse.h
parentf703d3fbccc99120e4b14e2722e82f67f882b159 (diff)
downloadsparse-dev-ee33e420fcfc7ddb359df8ca79316d8fe2084452.tar.gz
[PATCH] uninlining inline functions
When we take the address of an inline function or otherwise refusing to inline it, we need to output the now non-inline function properly. What we do is a) keeping body and symbol list of inlined function in new fields b) when expanding inlined call use these fields c) when evaluating the function itself (which happens if sparse decides that it can't be [always] inlined) uninline the sucker. I.e. create ->stmt and ->symbol_list by copying the ->inline_stmt and ->inline_symbol_list same as we would do while expanding a call. That guarantees that we won't run into trouble with inlined calls coming afterwards - evaluation doesn't mangle ->inline_stmt anymore.
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse.h b/parse.h
index 3420ca95..7fe52fe7 100644
--- a/parse.h
+++ b/parse.h
@@ -112,5 +112,6 @@ extern struct symbol *ctype_fp(unsigned long spec);
extern int match_string_ident(struct ident *, const char *);
extern void copy_statement(struct statement *src, struct statement *dst);
extern int inline_function(struct expression *expr, struct symbol *sym);
+extern void uninline(struct symbol *sym);
#endif /* PARSE_H */