Changeset 9a7a3b6
- Timestamp:
- Jun 19, 2018, 2:13:34 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- c194661
- Parents:
- 47498bd
- git-author:
- Rob Schluntz <rschlunt@…> (06/19/18 14:13:29)
- git-committer:
- Rob Schluntz <rschlunt@…> (06/19/18 14:13:34)
- Location:
- src/SymTab
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Indexer.cc
r47498bd r9a7a3b6 272 272 } 273 273 274 StructDecl *Indexer::globalLookupStruct( const std::string &id ) const { 275 return lookupStructAtScope( id, 0 ); 276 } 277 278 UnionDecl *Indexer::globalLookupUnion( const std::string &id ) const { 279 return lookupUnionAtScope( id, 0 ); 280 } 281 282 EnumDecl *Indexer::globalLookupEnum( const std::string &id ) const { 283 return lookupEnumAtScope( id, 0 ); 284 } 285 274 286 EnumDecl *Indexer::lookupEnum( const std::string &id ) const { 275 287 if ( ! tables ) return 0; … … 347 359 if ( ! tables ) return 0; 348 360 if ( tables->scope < scope ) return 0; 361 if ( tables->scope > scope ) return tables->base.lookupTypeAtScope( id, scope ); 349 362 350 363 TypeTable::const_iterator ret = tables->typeTable.find( id ); … … 355 368 if ( ! tables ) return 0; 356 369 if ( tables->scope < scope ) return 0; 370 if ( tables->scope > scope ) return tables->base.lookupStructAtScope( id, scope ); 357 371 358 372 StructTable::const_iterator ret = tables->structTable.find( id ); … … 363 377 if ( ! tables ) return 0; 364 378 if ( tables->scope < scope ) return 0; 379 if ( tables->scope > scope ) return tables->base.lookupEnumAtScope( id, scope ); 365 380 366 381 EnumTable::const_iterator ret = tables->enumTable.find( id ); … … 371 386 if ( ! tables ) return 0; 372 387 if ( tables->scope < scope ) return 0; 388 if ( tables->scope > scope ) return tables->base.lookupUnionAtScope( id, scope ); 373 389 374 390 UnionTable::const_iterator ret = tables->unionTable.find( id ); … … 379 395 if ( ! tables ) return 0; 380 396 if ( tables->scope < scope ) return 0; 397 if ( tables->scope > scope ) return tables->base.lookupTraitAtScope( id, scope ); 381 398 382 399 TraitTable::const_iterator ret = tables->traitTable.find( id ); -
src/SymTab/Indexer.h
r47498bd r9a7a3b6 70 70 /// Gets the top-most trait declaration with the given ID 71 71 TraitDecl *lookupTrait( const std::string &id ) const; 72 73 /// Gets the struct declaration with the given ID at global scope 74 StructDecl *globalLookupStruct( const std::string &id ) const; 75 /// Gets the union declaration with the given ID at global scope 76 UnionDecl *globalLookupUnion( const std::string &id ) const; 77 /// Gets the enum declaration with the given ID at global scope 78 EnumDecl *globalLookupEnum( const std::string &id ) const; 72 79 73 80 void print( std::ostream &os, int indent = 0 ) const;
Note: See TracChangeset
for help on using the changeset viewer.