Changeset 4e13e2a for src/AST/ForallSubstitutionTable.cpp
- Timestamp:
- Sep 17, 2019, 12:56:32 PM (5 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:
- 8e1467d
- Parents:
- a6f26ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/ForallSubstitutionTable.cpp
ra6f26ca r4e13e2a 19 19 #include <vector> 20 20 21 #include "Copy.hpp" // for shallowCopy 21 22 #include "Decl.hpp" 22 23 #include "Node.hpp" … … 26 27 namespace ast { 27 28 28 std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone( 29 const std::vector< ptr< TypeDecl > > & forall, Visitor & v 29 std::vector< ptr< TypeDecl > > ForallSubstitutionTable::clone( 30 const std::vector< ptr< TypeDecl > > & forall, Visitor & v 30 31 ) { 31 32 std::vector< ptr< TypeDecl > > new_forall; … … 34 35 for ( const ast::TypeDecl * d : forall ) { 35 36 // create cloned type decl and insert into substitution map before further mutation 36 auto new_d = new ast::TypeDecl{ 37 d->location, d->name, d->storage, d->base, d->kind, d->sized, d->init }; 37 auto new_d = shallowCopy( d ); 38 38 decls.insert( d, new_d ); 39 39 // perform other mutations and add to output
Note: See TracChangeset
for help on using the changeset viewer.