From f05e9e7ee26116ab88d8a5d7ff3ea68d1bd950ca Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 7 Dec 2017 17:24:41 +0100 Subject: Remove unused code. BUg 22642 --- backend/Inliningaux.ml | 4 ++-- cparser/Elab.ml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/Inliningaux.ml b/backend/Inliningaux.ml index 71db2730..42f58247 100644 --- a/backend/Inliningaux.ml +++ b/backend/Inliningaux.ml @@ -77,7 +77,7 @@ let inlining_analysis (p: program) = empty_inlining_info (* Test whether a function is static and called only once *) -let static_called_once fn_sig id io = +let static_called_once id io = if !Clflags.option_finline_functions_called_once then C2C.atom_is_static id && call_count id io <= 1 && not (address_taken id io) else @@ -87,6 +87,6 @@ let static_called_once fn_sig id io = let should_inline (io: inlining_info) (id: ident) (f: coq_function) = if !Clflags.option_finline && not (C2C.atom_is_noinline id) then - C2C.atom_is_inline id || static_called_once f.fn_sig id io + C2C.atom_is_inline id || static_called_once id io else false diff --git a/cparser/Elab.ml b/cparser/Elab.ml index c2d5ece7..e846e301 100644 --- a/cparser/Elab.ml +++ b/cparser/Elab.ml @@ -2365,7 +2365,6 @@ let elab_fundef env spec name defs body loc = && can_return then warning loc Invalid_noreturn "function '%s' declared 'noreturn' should not return" s; (* Build and emit function definition *) - let inline = inline in let fn = { fd_storage = sto1; fd_inline = inline; -- cgit