Changeset 365c8dcb for src/AST/Pass.proto.hpp
- Timestamp:
- Apr 14, 2022, 3:00:28 PM (2 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- bfd5512
- Parents:
- 30d91e4 (diff), 4ec9513 (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/AST/Pass.proto.hpp
r30d91e4 r365c8dcb 26 26 27 27 struct PureVisitor; 28 29 template<typename node_t> 30 node_t * deepCopy( const node_t * localRoot ); 28 31 29 32 namespace __pass { … … 396 399 static inline auto addStructFwd( core_t & core, int, const ast::StructDecl * decl ) -> decltype( core.symtab.addStruct( decl ), void() ) { 397 400 ast::StructDecl * fwd = new ast::StructDecl( decl->location, decl->name ); 398 fwd->params = decl->params; 401 for ( const auto & param : decl->params ) { 402 fwd->params.push_back( deepCopy( param.get() ) ); 403 } 399 404 core.symtab.addStruct( fwd ); 400 405 } … … 405 410 template<typename core_t> 406 411 static inline auto addUnionFwd( core_t & core, int, const ast::UnionDecl * decl ) -> decltype( core.symtab.addUnion( decl ), void() ) { 407 UnionDecl * fwd = new UnionDecl( decl->location, decl->name ); 408 fwd->params = decl->params; 412 ast::UnionDecl * fwd = new ast::UnionDecl( decl->location, decl->name ); 413 for ( const auto & param : decl->params ) { 414 fwd->params.push_back( deepCopy( param.get() ) ); 415 } 409 416 core.symtab.addUnion( fwd ); 410 417 }
Note: See TracChangeset
for help on using the changeset viewer.