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 6c3744e 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
|
Line | |
---|
1 | #include <iostream> |
---|
2 | #include <strstream> |
---|
3 | |
---|
4 | #include "LabelGenerator.h" |
---|
5 | |
---|
6 | namespace ControlStruct { |
---|
7 | LabelGenerator *LabelGenerator::labelGenerator = 0; |
---|
8 | |
---|
9 | LabelGenerator *LabelGenerator::getGenerator() { |
---|
10 | if ( LabelGenerator::labelGenerator == 0 ) |
---|
11 | LabelGenerator::labelGenerator = new LabelGenerator(); |
---|
12 | |
---|
13 | return labelGenerator; |
---|
14 | } |
---|
15 | |
---|
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 | } |
---|
23 | } // namespace ControlStruct |
---|
Note: See
TracBrowser
for help on using the repository browser.