ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Last change
on this file since 6926a6d was
d180746,
checked in by Thierry Delisle <tdelisle@…>, 7 years ago
|
Big header cleaning pass - commit 2
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[51587aa] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
[af68f0a] | 7 | // LabelGenerator.h -- |
---|
[51587aa] | 8 | // |
---|
[843054c2] | 9 | // Author : Rodolfo G. Esteves |
---|
[51587aa] | 10 | // Created On : Mon May 18 07:44:20 2015 |
---|
[6b0b624] | 11 | // Last Modified By : Peter A. Buhr |
---|
| 12 | // Last Modified On : Sat Jul 22 09:20:14 2017 |
---|
| 13 | // Update Count : 6 |
---|
[51587aa] | 14 | // |
---|
[a08ba92] | 15 | |
---|
[6b0b624] | 16 | #pragma once |
---|
[51b7345] | 17 | |
---|
[d180746] | 18 | #include <string> // for string |
---|
| 19 | |
---|
| 20 | #include "SynTree/Label.h" // for Label |
---|
| 21 | |
---|
| 22 | class Statement; |
---|
[51b7345] | 23 | |
---|
| 24 | namespace ControlStruct { |
---|
[a08ba92] | 25 | class LabelGenerator { |
---|
| 26 | public: |
---|
| 27 | static LabelGenerator *getGenerator(); |
---|
[af68f0a] | 28 | Label newLabel(std::string suffix, Statement * stmt = nullptr); |
---|
[a08ba92] | 29 | void reset() { current = 0; } |
---|
| 30 | void rewind() { current--; } |
---|
| 31 | protected: |
---|
| 32 | LabelGenerator(): current(0) {} |
---|
| 33 | private: |
---|
| 34 | int current; |
---|
| 35 | static LabelGenerator *labelGenerator; |
---|
| 36 | }; |
---|
[51b7345] | 37 | } // namespace ControlStruct |
---|
| 38 | |
---|
[51587aa] | 39 | // Local Variables: // |
---|
| 40 | // tab-width: 4 // |
---|
| 41 | // mode: c++ // |
---|
| 42 | // compile-command: "make install" // |
---|
| 43 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.