ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since d6ad99e 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
|
Line | |
---|
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 | // |
---|
7 | // LabelGenerator.h -- |
---|
8 | // |
---|
9 | // Author : Rodolfo G. Esteves |
---|
10 | // Created On : Mon May 18 07:44:20 2015 |
---|
11 | // Last Modified By : Peter A. Buhr |
---|
12 | // Last Modified On : Sat Jul 22 09:20:14 2017 |
---|
13 | // Update Count : 6 |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include <string> // for string |
---|
19 | |
---|
20 | #include "SynTree/Label.h" // for Label |
---|
21 | |
---|
22 | class Statement; |
---|
23 | |
---|
24 | namespace ControlStruct { |
---|
25 | class LabelGenerator { |
---|
26 | public: |
---|
27 | static LabelGenerator *getGenerator(); |
---|
28 | Label newLabel(std::string suffix, Statement * stmt = nullptr); |
---|
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 | }; |
---|
37 | } // namespace ControlStruct |
---|
38 | |
---|
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.