[Prev][Next][Index]

adding labels to statements




Have any of you used sage to add a label to a statement in C++?

I create a label using the constructor SgLabel(int).  I don't know what
the int represents, but the other choice is to use a PTR_LABEL.  Anyone
know what that is?  Looking at the code, it looks like an internal sage
thing.

Anyway, I then add the label using stmt.setLabel(*new_label).  I seem
to succeed, because next I assert(stmt.hasLabel());  but no label appears
when I unparse.

Also, I don't see where the SgLabelSymb object is connected with the 
statement label.  Do any of you understand this?

Thanks!

	---Erik
	eriks@cs.cmu.edu