source:
src/ControlStruct/LabelGenerator.h
@
119e6c8
Last change on this file since 119e6c8 was ca8c0362, checked in by , 3 years ago | |
---|---|
|
|
File size: 989 bytes |
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 |
[ca8c0362] | 11 | // Last Modified By : Peter A. Buhr |
12 | // Last Modified On : Mon Jan 31 22:30:10 2022 | |
13 | // Update Count : 16 | |
[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; | |
[ca8c0362] | 23 | |
[b8ab91a] | 24 | namespace ast { |
[ca8c0362] | 25 | class Stmt; |
26 | class Label; | |
[b8ab91a] | 27 | } |
[51b7345] | 28 | |
29 | namespace ControlStruct { | |
[de31a1d] | 30 | class LabelGenerator { |
31 | static int current; | |
32 | static LabelGenerator *labelGenerator; | |
[ca8c0362] | 33 | protected: |
[de31a1d] | 34 | LabelGenerator() {} |
[ca8c0362] | 35 | public: |
[de31a1d] | 36 | static LabelGenerator *getGenerator(); |
37 | static Label newLabel(std::string suffix, Statement * stmt = nullptr); | |
[b8ab91a] | 38 | }; |
[51b7345] | 39 | } // namespace ControlStruct |
40 | ||
[51587aa] | 41 | // Local Variables: // |
42 | // tab-width: 4 // | |
43 | // mode: c++ // | |
44 | // compile-command: "make install" // | |
45 | // End: // |
Note: See TracBrowser
for help on using the repository browser.