ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change
on this file since 5c7fb6c was
d9a0e76,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
remove Parser.old, add -XCFA to driver, copy ptrdiff_t from stddef.h in preclude, remove casts from initialization constants, adjust formatting
|
-
Property mode set to
100644
|
File size:
588 bytes
|
Rev | Line | |
---|
[51b7345] | 1 | #include <iostream> |
---|
| 2 | #include <strstream> |
---|
| 3 | |
---|
| 4 | #include "LabelGenerator.h" |
---|
| 5 | |
---|
| 6 | namespace ControlStruct { |
---|
[d9a0e76] | 7 | LabelGenerator *LabelGenerator::labelGenerator = 0; |
---|
[51b7345] | 8 | |
---|
[d9a0e76] | 9 | LabelGenerator *LabelGenerator::getGenerator() { |
---|
| 10 | if ( LabelGenerator::labelGenerator == 0 ) |
---|
| 11 | LabelGenerator::labelGenerator = new LabelGenerator(); |
---|
[51b7345] | 12 | |
---|
[d9a0e76] | 13 | return labelGenerator; |
---|
| 14 | } |
---|
[51b7345] | 15 | |
---|
[d9a0e76] | 16 | Label LabelGenerator::newLabel() { |
---|
| 17 | std::ostrstream os; |
---|
| 18 | os << "__L" << current++ << "__";// << std::ends; |
---|
| 19 | os.freeze( false ); |
---|
| 20 | std::string ret = std::string (os.str(), os.pcount()); |
---|
| 21 | return Label( ret ); |
---|
| 22 | } |
---|
[51b7345] | 23 | } // namespace ControlStruct |
---|
Note: See
TracBrowser
for help on using the repository browser.