Changes in src/ResolvExpr/RenameVars.cc [f76dd1a:93c10de]
- File:
-
- 1 edited
-
src/ResolvExpr/RenameVars.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/RenameVars.cc
rf76dd1a r93c10de 83 83 84 84 const ast::TypeInstType * rename( const ast::TypeInstType * type ) { 85 // rename 85 86 auto it = idMap.find( type->name ); 86 if ( it == idMap.end() ) return type; 87 88 // Unconditionally mutate because map will *always* have different name. 89 ast::TypeInstType * mut = ast::shallowCopy( type ); 90 // Reconcile base node since some copies might have been made. 91 mut->base = it->second.base; 92 mut->formal_usage = it->second.formal_usage; 93 mut->expr_id = it->second.expr_id; 94 return mut; 87 if ( it != idMap.end() ) { 88 // unconditionally mutate because map will *always* have different name 89 ast::TypeInstType * mut = ast::shallowCopy( type ); 90 // reconcile base node since some copies might have been made 91 mut->base = it->second.base; 92 mut->formal_usage = it->second.formal_usage; 93 mut->expr_id = it->second.expr_id; 94 type = mut; 95 } 96 97 return type; 95 98 } 96 99 … … 184 187 185 188 const ast::Type * renameTyVars( const ast::Type * t, RenameMode mode, bool reset ) { 189 // ast::Type *tc = ast::deepCopy(t); 186 190 ast::Pass<RenameVars_new> renamer; 187 191 renamer.core.mode = mode;
Note:
See TracChangeset
for help on using the changeset viewer.