Changeset 33b7d49 for src/AST/Util.cpp
- Timestamp:
- Mar 15, 2022, 10:14:05 AM (2 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 48a91e2
- Parents:
- d824715
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Util.cpp
rd824715 r33b7d49 10 10 // Created On : Wed Jan 19 9:46:00 2022 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Feb 18 9:42:00 202213 // Update Count : 012 // Last Modified On : Fri Mar 11 18:07:00 2022 13 // Update Count : 1 14 14 // 15 15 16 16 #include "Util.hpp" 17 17 18 #include "Decl.hpp"19 18 #include "Node.hpp" 19 #include "ParseNode.hpp" 20 20 #include "Pass.hpp" 21 21 #include "TranslationUnit.hpp" 22 #include "Common/ScopedMap.h"23 22 24 23 #include <vector> … … 46 45 }; 47 46 47 /// Check that every note that can has a set CodeLocation. 48 struct SetCodeLocationsCore { 49 void previsit( const ParseNode * node ) { 50 assert( node->location.isSet() ); 51 } 52 }; 53 48 54 struct InvariantCore { 49 55 // To save on the number of visits: this is a kind of composed core. 50 56 // None of the passes should make changes so ordering doesn't matter. 51 57 NoStrongCyclesCore no_strong_cycles; 58 SetCodeLocationsCore set_code_locations; 52 59 53 60 void previsit( const Node * node ) { 54 61 no_strong_cycles.previsit( node ); 62 } 63 64 void previsit( const ParseNode * node ) { 65 no_strong_cycles.previsit( node ); 66 set_code_locations.previsit( node ); 55 67 } 56 68
Note: See TracChangeset
for help on using the changeset viewer.