First of all, I don't think changing CIL source files directly is a good idea. 
It would be better to implement a dedicated visitor for this job. I think the 
visitor should visit the globals (GVarDecl and GFun) of the single C file and 
change the vstorage to static. 

2012-04-11



林楠



发件人:Harald Gustafsson
发送时间:2012-04-11 00:47
主题:[CIL users] merge and convert declarations to static
收件人:"cil-users"<cil-users@lists.sourceforge.net>
抄送:

I'm using CIL to merge a c-project into one file scope, which works 
well. I'm doing this since I'm testing to convert libx264 video codec 
library into Android's Renderscript. Renderscript is C99 compliant, 
but requires one file scope for a complete program. Another 
requirement is that anything that should not be exported to java needs 
to be declared static. I changed processVarinfo in mergecil.ml to 
change vstorage to Static, but it seems that is not enough. 

I need some help in identifying the correct places to make global 
declarations static in the CIL code, any tip welcome since I'm new to 
CIL. 

Thanks, 
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 
CIL-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/cil-users 
------------------------------------------------------------------------------
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
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to