Changes in src/AST/SymbolTable.cpp [d859a30:561354f]
- File:
-
- 1 edited
-
src/AST/SymbolTable.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/SymbolTable.cpp
rd859a30 r561354f 358 358 } 359 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 }); 378 } 379 360 380 void SymbolTable::addUnion( const std::string &id ) { 361 381 addUnion( new UnionDecl( CodeLocation(), id ) );
Note:
See TracChangeset
for help on using the changeset viewer.