Changeset ba54f7d for src/Common/PassVisitor.h
- Timestamp:
- Sep 13, 2017, 3:11:24 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- c57ded70, db70fe4
- Parents:
- d130fe8 (diff), 982832e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
rd130fe8 rba54f7d 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.