Changes in / [242d458:1b0020a]
- Location:
- src
- Files:
-
- 2 edited
-
ResolvExpr/Resolver.cc (modified) (1 diff)
-
SymTab/Validate.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r242d458 r1b0020a 446 446 } else if ( StructInstType * st = dynamic_cast< StructInstType * >( initContext ) ) { 447 447 resolveAggrInit( st->get_baseStruct(), iter, end ); 448 } else if ( UnionInstType * st = dynamic_cast< UnionInstType * >( initContext ) ) {448 } else if ( UnionInstType *st = dynamic_cast< UnionInstType * >( initContext ) ) { 449 449 resolveAggrInit( st->get_baseUnion(), iter, end ); 450 } else if ( TypeInstType * tt = dynamic_cast< TypeInstType * >( initContext ) ) {451 Type * base = tt->get_baseType()->get_base();452 if ( base ) {453 // know the implementation type, so try using that as the initContext454 initContext = base;455 visit( listInit );456 } else {457 // missing implementation type -- might be an unknown type variable, so try proceeding with the current init context458 Visitor::visit( listInit );459 }460 450 } else { 461 assert( dynamic_cast< BasicType * >( initContext ) || dynamic_cast< PointerType * >( initContext ) );462 451 // basic types are handled here 463 452 Visitor::visit( listInit ); -
src/SymTab/Validate.cc
r242d458 r1b0020a 162 162 163 163 typedef std::map< std::string, std::pair< TypedefDecl *, int > > TypedefMap; 164 typedef std::map< std::string, TypeDecl * > TypeDeclMap;165 164 TypedefMap typedefNames; 166 TypeDeclMap typedeclNames;167 165 int scopeLevel; 168 166 }; … … 523 521 delete typeInst; 524 522 return ret; 525 } else {526 TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() );527 assert( base != typedeclNames.end() );528 typeInst->set_baseType( base->second->clone() );529 523 } // if 530 524 return typeInst; … … 571 565 typedefNames.erase( i ) ; 572 566 } // if 573 574 typedeclNames[ typeDecl->get_name() ] = typeDecl;575 567 return typeDecl; 576 568 }
Note:
See TracChangeset
for help on using the changeset viewer.