From 3db23b0dec76030e94fa569cecf82a3ffd094d35 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 20 Feb 2013 14:59:46 +0300 Subject: [PATCH] flow, db: rename should_inline() to inlinable() and export the function We need to know in the database if a function call has been loaded into the in-memory database. Signed-off-by: Dan Carpenter --- smatch.h | 1 + smatch_flow.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/smatch.h b/smatch.h index f3c79b1c..4899f916 100644 --- a/smatch.h +++ b/smatch.h @@ -328,6 +328,7 @@ extern int option_no_db; extern int option_file_output; extern struct expression_list *big_expression_stack; extern struct statement_list *big_statement_stack; +int inlinable(struct expression *expr); extern int __inline_call; extern struct expression *__inline_fn; extern int __in_pre_condition; diff --git a/smatch_flow.c b/smatch_flow.c index c6f616a1..1baf83fd 100644 --- a/smatch_flow.c +++ b/smatch_flow.c @@ -103,7 +103,7 @@ static int is_noreturn_func(struct expression *expr) return 0; } -static int should_inline(struct expression *expr) +int inlinable(struct expression *expr) { struct symbol *sym; @@ -236,11 +236,11 @@ void __split_expr(struct expression *expr) __split_expr(expr->fn); if (is_inline_func(expr->fn)) add_inline_function(expr->fn->symbol); - if (should_inline(expr->fn)) + if (inlinable(expr->fn)) __inline_call = 1; __pass_to_client(expr, FUNCTION_CALL_HOOK); __inline_call = 0; - if (should_inline(expr->fn)) { + if (inlinable(expr->fn)) { parse_inline(expr); } if (is_noreturn_func(expr->fn)) -- 2.11.4.GIT