Changeset b8ab91a for src/ControlStruct/LabelGenerator.h
- Timestamp:
- Nov 5, 2021, 1:46:46 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 21fe17f
- Parents:
- 77c01ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/LabelGenerator.h
r77c01ec rb8ab91a 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:20:14 201713 // Update Count : 611 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Nov 1 12:19:00 2021 13 // Update Count : 7 14 14 // 15 15 … … 21 21 22 22 class Statement; 23 namespace ast { 24 class Stmt; 25 class Label; 26 } 23 27 24 28 namespace ControlStruct { … … 35 39 static LabelGenerator *labelGenerator; 36 40 }; 41 42 class LabelGenerator_new { 43 int current; 44 static LabelGenerator_new *labelGenerator; 45 46 LabelGenerator_new() : current(0) {} 47 public: 48 static LabelGenerator_new *getGenerator(); 49 50 ast::Label newLabel( const std::string& suffix, const ast::Stmt * stmt ); 51 void reset() { current = 0; } 52 void rewind() { --current; } 53 }; 54 37 55 } // namespace ControlStruct 38 56
Note: See TracChangeset
for help on using the changeset viewer.