From c54e20b2c444ddbb561bb4ac0422c92b77b656b1 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Tue, 15 Mar 2016 16:23:12 +0100 Subject: Removed not needed env. The functions for naming string and wstring literals no longer need an env. Bug 18394 --- cfrontend/C2C.ml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cfrontend/C2C.ml') diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index fb4d9a8c..6eabfbf4 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -267,7 +267,7 @@ let stringNum = ref 0 (* number of next global for string literals *) let stringTable : (string, AST.ident) Hashtbl.t = Hashtbl.create 47 let wstringTable : (int64 list, AST.ident) Hashtbl.t = Hashtbl.create 47 -let name_for_string_literal env s = +let name_for_string_literal s = try Hashtbl.find stringTable s with Not_found -> @@ -297,7 +297,7 @@ let global_for_string s id = (id, Gvar {gvar_info = typeStringLiteral s; gvar_init = !init; gvar_readonly = true; gvar_volatile = false}) -let name_for_wide_string_literal env s = +let name_for_wide_string_literal s = try Hashtbl.find wstringTable s with Not_found -> @@ -478,7 +478,7 @@ let checkFunctionType env tres targs = l end end - + let rec convertTyp env t = match t with | C.TVoid a -> Tvoid @@ -659,10 +659,10 @@ let rec convertExpr env e = convertFloat f k | C.EConst(C.CStr s) -> let ty = typeStringLiteral s in - Evalof(Evar(name_for_string_literal env s, ty), ty) + Evalof(Evar(name_for_string_literal s, ty), ty) | C.EConst(C.CWStr s) -> let ty = typeWideStringLiteral s in - Evalof(Evar(name_for_wide_string_literal env s, ty), ty) + Evalof(Evar(name_for_wide_string_literal s, ty), ty) | C.EConst(C.CEnum(id, i)) -> Ctyping.econst_int (convertInt i) Signed | C.ESizeof ty1 -> -- cgit