Changes in src/Common/PassVisitor.h [2065609:e0886db]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
r2065609 re0886db 7 7 #include "SynTree/Mutator.h" 8 8 #include "SynTree/Visitor.h" 9 10 #include "SymTab/Indexer.h" 9 11 10 12 #include "SynTree/Initializer.h" … … 265 267 266 268 void set_visit_children( bool& ref ) { bool_ref * ptr = visit_children_impl(pass, 0); if(ptr) ptr->set( ref ); } 269 270 void indexerScopeEnter () { indexer_impl_enterScope ( pass, 0 ); } 271 void indexerScopeLeave () { indexer_impl_leaveScope ( pass, 0 ); } 272 void indexerAddId ( DeclarationWithType * node ) { indexer_impl_addId ( pass, 0, node ); } 273 void indexerAddType ( NamedTypeDecl * node ) { indexer_impl_addType ( pass, 0, node ); } 274 void indexerAddStruct ( const std::string & id ) { indexer_impl_addStruct ( pass, 0, id ); } 275 void indexerAddStruct ( StructDecl * node ) { indexer_impl_addStruct ( pass, 0, node ); } 276 void indexerAddStructFwd( StructDecl * node ) { indexer_impl_addStructFwd( pass, 0, node ); } 277 void indexerAddEnum ( EnumDecl * node ) { indexer_impl_addEnum ( pass, 0, node ); } 278 void indexerAddUnion ( const std::string & id ) { indexer_impl_addUnion ( pass, 0, id ); } 279 void indexerAddUnion ( UnionDecl * node ) { indexer_impl_addUnion ( pass, 0, node ); } 280 void indexerAddUnionFwd ( UnionDecl * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); } 281 void indexerAddTrait ( TraitDecl * node ) { indexer_impl_addTrait ( pass, 0, node ); } 282 283 template< typename TreeType, typename VisitorType > 284 friend inline void indexerScopedAccept( TreeType * tree, VisitorType &visitor ); 285 286 template< typename TreeType, typename VisitorType > 287 friend inline void indexerScopedMutate( TreeType *& tree, VisitorType &visitor ); 267 288 }; 268 289 … … 296 317 protected: 297 318 WithDeclsToAdd() = default; 298 ~WithDeclsToAdd() = default; 319 ~WithDeclsToAdd() { 320 assert( declsToAddBefore.empty() ); 321 } 299 322 300 323 public: … … 351 374 }; 352 375 376 class WithIndexer { 377 protected: 378 WithIndexer() {} 379 ~WithIndexer() {} 380 381 public: 382 SymTab::Indexer indexer; 383 }; 384 353 385 #include "PassVisitor.impl.h"
Note:
See TracChangeset
for help on using the changeset viewer.