Changeset 4520b77e for src/SymTab
- Timestamp:
- Sep 20, 2022, 8:37:05 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- a065f1f
- Parents:
- d489da8 (diff), 12df6fe (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/SymTab
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Mangler.cc
rd489da8 r4520b77e 65 65 void postvisit( const QualifiedType * qualType ); 66 66 67 void postvisit( const QualifiedNameExpr * qualNameExpr ); 68 67 69 std::string get_mangleName() { return mangleName; } 68 70 private: … … 305 307 mangleName += Encoding::qualifiedTypeEnd; 306 308 } 309 } 310 311 void Mangler_old::postvisit( const QualifiedNameExpr * qual ) { 312 maybeAccept( qual->var, *visitor ); 307 313 } 308 314 … … 417 423 void postvisit( const ast::OneType * oneType ); 418 424 void postvisit( const ast::QualifiedType * qualType ); 425 void postvisit( const ast::QualifiedNameExpr * qualNameExpr ); 419 426 420 427 std::string get_mangleName() { return mangleName; } … … 645 652 mangleName += Encoding::qualifiedTypeEnd; 646 653 } 654 } 655 void Mangler_new::postvisit( const ast::QualifiedNameExpr * qual ) { 656 maybeAccept( qual->var.get(), *visitor ); 647 657 } 648 658 -
src/SymTab/Validate.cc
rd489da8 r4520b77e 857 857 } else if ( UnionInstType * aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) { 858 858 declsToAddBefore.push_back( new UnionDecl( aggDecl->name, noAttributes, tyDecl->linkage ) ); 859 } else if ( EnumInstType * enum Decl= dynamic_cast< EnumInstType * >( designatorType ) ) {859 } else if ( EnumInstType * enumInst = dynamic_cast< EnumInstType * >( designatorType ) ) { 860 860 // declsToAddBefore.push_back( new EnumDecl( enumDecl->name, noAttributes, tyDecl->linkage, enumDecl->baseEnum->base ) ); 861 if (enumDecl->baseEnum) { 862 declsToAddBefore.push_back( new EnumDecl( enumDecl->name, noAttributes, tyDecl->linkage, enumDecl->baseEnum->base ) ); 861 if ( enumInst->baseEnum ) { 862 const EnumDecl * enumDecl = enumInst->baseEnum; 863 declsToAddBefore.push_back( new EnumDecl( enumDecl->name, noAttributes, enumDecl->isTyped, tyDecl->linkage, enumDecl->base ) ); 863 864 } else { 864 declsToAddBefore.push_back( new EnumDecl( enum Decl->name, noAttributes, tyDecl->linkage ) );865 declsToAddBefore.push_back( new EnumDecl( enumInst->name, noAttributes, tyDecl->linkage ) ); 865 866 } 866 867 } // if -
src/SymTab/ValidateType.cc
rd489da8 r4520b77e 82 82 void postvisit( QualifiedType * qualType ); 83 83 84 void postvisit( QualifiedNameExpr * qualExpr ); 85 84 86 void postvisit( EnumDecl * enumDecl ); 85 87 void postvisit( StructDecl * structDecl ); … … 157 159 // linking only makes sense for the 'oldest ancestor' of the qualified type 158 160 qualType->parent->accept( * visitor ); 161 } 162 163 void LinkReferenceToTypes_old::postvisit( QualifiedNameExpr * qualExpr ) { 164 const EnumDecl * st = local_indexer->lookupEnum( qualExpr->type_decl->name ); 165 qualExpr->type_decl = const_cast<EnumDecl *>(st); 159 166 } 160 167
Note: See TracChangeset
for help on using the changeset viewer.