On Fri, 29 Nov 2002, Daniel Berlin wrote:
On Friday, November 29, 2002, at 12:50 PM, Diego Novillo wrote:
On Fri, 29 Nov 2002, Andrew Macleod wrote:
So why does the builder do this? why doesn't it do something such as
link a compound statement into the tree, hang an empty_stmt node off
it,
and then point to that?
Because the CFG builder is not particularly bright. Your
suggestion sounds good to me. Care to implement it? :)
You have to hang two, no?
:)
Hmm, maybe, but I wouldn't have thought it to be necessary. I
really haven't given much thought to it yet. In principle,
inserting a statement is a matter of
1- Create a COMPOUND_EXPR containing the new statement (N) and
the old statement (O). The relative order between N and O
depends on whether you want to insert before or after.