From 41b68f1746132f41063c6d698b0a67eb08f828cd Mon Sep 17 00:00:00 2001
From: Basile Desloges <basile.desloges@cea.fr>
Date: Fri, 9 Oct 2020 15:06:05 +0200
Subject: [PATCH] [variadic] Store the translation

---
 src/plugins/variadic/standard.ml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/plugins/variadic/standard.ml b/src/plugins/variadic/standard.ml
index d80886c8c05..996987ac14d 100644
--- a/src/plugins/variadic/standard.ml
+++ b/src/plugins/variadic/standard.ml
@@ -292,6 +292,9 @@ let overloaded_call ~fundec overload block loc mk_call vf args =
         raise Translate_call_exn;
   in
 
+  (* Store the translation *)
+  Replacements.add new_callee vf.vf_decl;
+
   (* Rebuild the call *)
   Self.result ~current:true ~level:2
     "Translating call to the specialized version %a."
@@ -635,6 +638,9 @@ let format_fun_call ~fundec env format_fun scope loc mk_call vf args =
   new_callee.vname <- new_name;
   new_globals := glob :: !new_globals;
 
+  (* Store the translation *)
+  Replacements.add new_callee vf.vf_decl;
+
   (* Translate the call *)
   Self.result ~current:true ~level:2
     "Translating call to %s to a call to the specialized version %s."
-- 
GitLab