From c86388b548984dae5f8dd794cad1f4b4505d4307 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 20 Mar 2019 10:38:23 +0100 Subject: ça semble passer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cfrontend/C2C.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cfrontend/C2C.ml') diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index f928a5d3..f0ae4367 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -1214,7 +1214,7 @@ let convertFundef loc env fd = (** External function declaration *) let re_builtin = Str.regexp "__builtin_" -let re_runtime = Str.regexp "__compcert_i64_" +let re_runtime = Str.regexp "__compcert_i" let convertFundecl env (sto, id, ty, optinit) = let (args, res, cconv) = @@ -1227,7 +1227,9 @@ let convertFundecl env (sto, id, ty, optinit) = let ef = if id.name = "malloc" then AST.EF_malloc else if id.name = "free" then AST.EF_free else - if Str.string_match re_runtime id.name 0 then AST.EF_runtime(id'', sg) else + if Str.string_match re_runtime id.name 0 + then AST.EF_runtime(id'', sg) + else if Str.string_match re_builtin id.name 0 && List.mem_assoc id.name builtins.Builtins.functions then AST.EF_builtin(id'', sg) -- cgit