Adding the new statement to s.succs wouldn't add it into the function body. I 
haven't used succs directly, but I'm fairly sure this is successors in the 
control flow graph, not just those statements that come after it in the text of 
the program.

Mark
________________________________________
From: Elnatan Reisner [elna...@cs.umd.edu]
Sent: Monday, April 27, 2009 1:14 PM
To: Divya Krishnan
Cc: cil-users@lists.sourceforge.net
Subject: Re: [CIL users] Adding stmts after a particular statement

I don't know why changing s.succs didn't work, but I think you should be
able to use ChangeTo if you replace 's' with a statement with skind
Block and put the list of statements you want into that Block.
-Elnatan

On Mon, 2009-04-27 at 13:47 -0400, Divya Krishnan wrote:
> Hi ,
> I would like to add a list of statements AFTER a particular statement
> in a block. So if 's' is the current statement, I tried to add a list
> of statements after 's' by appending the list to s.succs. However I
> cannot see my statements reflected in the output. I cannot use
> ChangeTo since that allows me to replace the existing statement with
> another statement not a statement list as I need. Also I cannot use
> self#queueInstr as that adds statements before the current statement.
> Why aren't the statements getting reflected by adding them to s.succs.
> Are there any other fields that I need to change?
>
> Thanks,
> -Divya


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to