aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Rename.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-10-20 13:32:18 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-10-20 13:32:18 +0200
commit4d542bc7eafadb16b845cf05d1eb4988eb55ed0f (patch)
tree1961b41815fc6e392cc0bd2beeb0fb504bc160ce /cparser/Rename.ml
parent7a6bb90048db7a254e959b1e3c308bac5fe6c418 (diff)
downloadcompcert-kvx-4d542bc7eafadb16b845cf05d1eb4988eb55ed0f.tar.gz
compcert-kvx-4d542bc7eafadb16b845cf05d1eb4988eb55ed0f.zip
Updated PR by removing whitespaces. Bug 17450.
Diffstat (limited to 'cparser/Rename.ml')
-rw-r--r--cparser/Rename.ml16
1 files changed, 8 insertions, 8 deletions
diff --git a/cparser/Rename.ml b/cparser/Rename.ml
index b0dc120f..4b387b0d 100644
--- a/cparser/Rename.ml
+++ b/cparser/Rename.ml
@@ -42,20 +42,20 @@ let enter_public env id =
{ re_id = IdentMap.add id id env.re_id;
re_public = StringMap.add id.name id env.re_public;
re_used = StringSet.add id.name env.re_used }
-
+
let enter_static env id file =
try
let id' = StringMap.find id.name env.re_public in
{ env with re_id = IdentMap.add id id' env.re_id }
with Not_found ->
let file = String.map (fun a -> match a with 'a'..'z' | 'A'..'Z' | '0'..'9' -> a | _ -> '_') file in
- let id' = {id with name = Printf.sprintf "_%s_%s" file id.name} in
+ let id' = {id with name = Printf.sprintf "_%s_%s" file id.name} in
{ re_id = IdentMap.add id id' env.re_id;
re_public = env.re_public;
re_used = StringSet.add id'.name env.re_used }
(* For static or local identifiers, we make up a new name if needed *)
-(* If the same identifier has already been declared,
+(* If the same identifier has already been declared,
don't rename a second time *)
let rename env id =
@@ -94,7 +94,7 @@ let ident env id =
try
IdentMap.find id env.re_id
with Not_found ->
- Cerrors.fatal_error "Internal error: Rename: %s__%d unbound"
+ Cerrors.fatal_error "Internal error: Rename: %s__%d unbound"
id.name id.stamp
let rec typ env = function
@@ -111,7 +111,7 @@ let rec typ env = function
| ty -> ty
and param env (id, ty) =
- if id.name = "" then
+ if id.name = "" then
((id, typ env ty), env)
else
let (id', env') = rename env id in ((id', typ env' ty), env')
@@ -216,7 +216,7 @@ let fundef env f =
fd_body = stmt env2 f.fd_body },
env0 )
-let enum env (id, v, opte) =
+let enum env (id, v, opte) =
let (id', env') = rename env id in
((id', v, optexp env' opte), env')
@@ -269,7 +269,7 @@ let rec reserve_public env file = function
begin match sto with
| Storage_default | Storage_extern -> enter_public env id
| Storage_static -> if !Clflags.option_rename_static then
- enter_static env id file
+ enter_static env id file
else
env
| _ -> assert false
@@ -292,4 +292,4 @@ let program p file =
globdecls
(reserve_public (reserve_builtins()) file p)
[] p
-
+