Introduction | Projects and Files | Statements | Expressions | Symbols | Types |
Attributes | Labels | Non-Member Functions | Constructing Declarations | Example Programs | Index |
Represents labels, for all languages.
class SgLabel { public: PTR_LABEL thelabel; inline SgLabel(PTR_LABEL lab); inline SgLabel(SgLabel &); inline SgLabel(int i); inline SgLabel(SgLabelSymb & lab_symb); inline SgSymbol * symbol(); inline SgStatement * SgLabel::statement(); inline int id(); inline int getLastLabelVal(); inline ~SgLabel(); };
Here is how one can create labels:
SgLabelSymb * foo = new SgLabelSymb("foo", *s); SgLabel * foolab = new SgLabel(*foo); SgLabelStmt * ls = new SgLabelStmt(*foolab, *s);
Note that s
is of type SgStatement *
, and is the scope of
the label statement.
So here are the steps for using labels: