Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/SymbolTable.cpp

    r561354f rd859a30  
    356356        ++*stats().map_mutations;
    357357        enumTable = enumTable->set( id, scoped<EnumDecl>{ decl, scope } );
    358 }
    359 
    360 void SymbolTable::addAdt( const AdtDecl *decl ) {
    361         ++*stats().add_calls;
    362         const std::string &id = decl->name;
    363 
    364         if ( ! adtTable ) {
    365                 adtTable = AdtTable::new_ptr();
    366         } else {
    367                 ++*stats().map_lookups;
    368                 auto existing = adtTable->find( id );
    369                 if ( existing != adtTable->end()
    370                         && existing->second.scope == scope
    371                         && addedDeclConflicts( existing->second.decl, decl ) ) return;
    372        
    373         }
    374 
    375         lazyInitScope();
    376         ++*stats().map_mutations;
    377         adtTable = adtTable->set( id, scoped<AdtDecl>{ decl, scope });
    378358}
    379359
Note: See TracChangeset for help on using the changeset viewer.