Thanks for the help. For the record here is the complete code with
typos fixed. I also switched to default not apply it and only enable
it when doing the ar pass with cilly on the merged code.
(* Convert all global definitions/declarations into static
*)
open Cil
open Pretty
class makeStaticVisitor = object(self)
inherit nopCilVisitor
method vglob = function
| GVarDecl (vi, _)
| GVar (vi, _, _)
| GFun ({ svar = vi }, _) -> begin
vi.vstorage <- Static;
SkipChildren
end
| _ -> SkipChildren
end
let feature : featureDescr =
{ fd_name = "makeStatic";
fd_enabled = ref false;
fd_description = "change storage to static for globals" ;
fd_extraopt = [];
fd_doit = (fun f -> visitCilFileSameGlobals(new makeStaticVisitor) f);
fd_post_check = true;
}
Regards,
Harald
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
CIL-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cil-users