- Timestamp:
- Jun 26, 2020, 2:34:09 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c15085d
- Parents:
- 81da70a5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Copy.hpp
r81da70a5 r276f105 10 10 // Created On : Wed Jul 10 16:13:00 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr Jul 11 10:38:00 201913 // Update Count : 012 // Last Modified On : Fri Jun 19 16:43:00 2020 13 // Update Count : 1 14 14 // 15 15 … … 45 45 std::unordered_set< readonly<Node> * > readonlyCache; 46 46 47 template<typename node_t> 48 void readonlyInsert( const readonly<node_t> * ptrptr ) { 49 readonlyCache.insert( (readonly<Node> *) ptrptr ); 50 } 51 47 52 public: 48 53 template<typename node_t> … … 54 59 55 60 void postvisit( const AggregateDecl * node ) { 56 readonly Cache.insert( (readonly<Node> *) &node->parent );61 readonlyInsert( &node->parent ); 57 62 } 58 63 59 64 void postvisit( const StructInstType * node ) { 60 readonly Cache.insert( (readonly<Node> *) &node->base );65 readonlyInsert( &node->base ); 61 66 } 62 67 63 68 void postvisit( const UnionInstType * node ) { 64 readonly Cache.insert( (readonly<Node> *) &node->base );69 readonlyInsert( &node->base ); 65 70 } 66 71 67 72 void postvisit( const EnumInstType * node ) { 68 readonly Cache.insert( (readonly<Node> *) &node->base );73 readonlyInsert( &node->base ); 69 74 } 70 75 71 76 void postvisit( const TraitInstType * node ) { 72 readonly Cache.insert( (readonly<Node> *) &node->base );77 readonlyInsert( &node->base ); 73 78 } 74 79 75 80 void postvisit( const TypeInstType * node ) { 76 readonly Cache.insert( (readonly<Node> *) &node->base );81 readonlyInsert( &node->base ); 77 82 } 78 83 79 84 void postvisit( const ImplicitCtorDtorStmt * node ) { 80 readonly Cache.insert( (readonly<Node> *) &node->callStmt );85 readonlyInsert( (const readonly<Stmt> *) &node->callStmt ); 81 86 } 82 87 83 88 void postvisit( const MemberExpr * node ) { 84 readonly Cache.insert( (readonly<Node> *) &node->member );89 readonlyInsert( &node->member ); 85 90 } 86 91 87 92 void postvisit( const VariableExpr * node ) { 88 readonly Cache.insert( (readonly<Node> *) &node->var );93 readonlyInsert( &node->var ); 89 94 } 90 95 91 96 void postvisit( const OffsetofExpr * node ) { 92 readonly Cache.insert( (readonly<Node> *) &node->member );97 readonlyInsert( &node->member ); 93 98 } 94 99 95 100 void postvisit( const DeletedExpr * node ) { 96 readonly Cache.insert( (readonly<Node> *) &node->deleteStmt );101 readonlyInsert( &node->deleteStmt ); 97 102 } 98 103
Note: See TracChangeset
for help on using the changeset viewer.