aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/C2C.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-03-15 16:23:12 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2016-03-15 16:23:12 +0100
commitc54e20b2c444ddbb561bb4ac0422c92b77b656b1 (patch)
treead4762ada64ab8deb8f5c28212d720a49e04a1e5 /cfrontend/C2C.ml
parent272a5b812b72f4c3e409ccdbeaf3476d95c4b552 (diff)
downloadcompcert-c54e20b2c444ddbb561bb4ac0422c92b77b656b1.tar.gz
compcert-c54e20b2c444ddbb561bb4ac0422c92b77b656b1.zip
Removed not needed env.
The functions for naming string and wstring literals no longer need an env. Bug 18394
Diffstat (limited to 'cfrontend/C2C.ml')
-rw-r--r--cfrontend/C2C.ml10
1 files changed, 5 insertions, 5 deletions
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 ->