Changeset a08ba92 for translator/SymTab/Validate.cc
- Timestamp:
- May 19, 2015, 4:58:14 PM (11 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, stuck-waitfor-destruct, with_gc
- Children:
- 843054c2
- Parents:
- 01aeade
- File:
-
- 1 edited
-
translator/SymTab/Validate.cc (modified) (38 diffs)
Legend:
- Unmodified
- Added
- Removed
-
translator/SymTab/Validate.cc
r01aeade ra08ba92 10 10 // Created On : Sun May 17 21:50:04 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun May 17 21:53:16201513 // Update Count : 212 // Last Modified On : Tue May 19 16:50:09 2015 13 // Update Count : 3 14 14 // 15 15 … … 57 57 58 58 namespace SymTab { 59 class HoistStruct : public Visitor {60 public:59 class HoistStruct : public Visitor { 60 public: 61 61 static void hoistStruct( std::list< Declaration * > &translationUnit ); 62 62 … … 74 74 virtual void visit( CaseStmt *caseStmt ); 75 75 virtual void visit( CatchStmt *catchStmt ); 76 private:76 private: 77 77 HoistStruct(); 78 78 … … 81 81 std::list< Declaration * > declsToAdd; 82 82 bool inStruct; 83 };84 85 class Pass1 : public Visitor {83 }; 84 85 class Pass1 : public Visitor { 86 86 typedef Visitor Parent; 87 87 virtual void visit( EnumDecl *aggregateDecl ); 88 88 virtual void visit( FunctionType *func ); 89 };90 91 class Pass2 : public Indexer {89 }; 90 91 class Pass2 : public Indexer { 92 92 typedef Indexer Parent; 93 public:93 public: 94 94 Pass2( bool doDebug, const Indexer *indexer ); 95 private:95 private: 96 96 virtual void visit( StructInstType *structInst ); 97 97 virtual void visit( UnionInstType *unionInst ); … … 107 107 ForwardStructsType forwardStructs; 108 108 ForwardUnionsType forwardUnions; 109 };110 111 class Pass3 : public Indexer {109 }; 110 111 class Pass3 : public Indexer { 112 112 typedef Indexer Parent; 113 public:113 public: 114 114 Pass3( const Indexer *indexer ); 115 private:115 private: 116 116 virtual void visit( ObjectDecl *object ); 117 117 virtual void visit( FunctionDecl *func ); 118 118 119 119 const Indexer *indexer; 120 };121 122 class AddStructAssignment : public Visitor {123 public:120 }; 121 122 class AddStructAssignment : public Visitor { 123 public: 124 124 static void addStructAssignment( std::list< Declaration * > &translationUnit ); 125 125 … … 145 145 146 146 AddStructAssignment() : functionNesting( 0 ) {} 147 private:147 private: 148 148 template< typename StmtClass > void visitStatement( StmtClass *stmt ); 149 149 … … 151 151 std::set< std::string > structsDone; 152 152 unsigned int functionNesting; // current level of nested functions 153 };154 155 class EliminateTypedef : public Mutator {156 public:153 }; 154 155 class EliminateTypedef : public Mutator { 156 public: 157 157 static void eliminateTypedef( std::list< Declaration * > &translationUnit ); 158 private:158 private: 159 159 virtual Declaration *mutate( TypedefDecl *typeDecl ); 160 160 virtual TypeDecl *mutate( TypeDecl *typeDecl ); … … 166 166 167 167 std::map< std::string, TypedefDecl * > typedefNames; 168 };169 170 void validate( std::list< Declaration * > &translationUnit, bool doDebug ) {168 }; 169 170 void validate( std::list< Declaration * > &translationUnit, bool doDebug ) { 171 171 Pass1 pass1; 172 172 Pass2 pass2( doDebug, 0 ); … … 178 178 AddStructAssignment::addStructAssignment( translationUnit ); 179 179 acceptAll( translationUnit, pass3 ); 180 }181 182 void validateType( Type *type, const Indexer *indexer ) {180 } 181 182 void validateType( Type *type, const Indexer *indexer ) { 183 183 Pass1 pass1; 184 184 Pass2 pass2( false, indexer ); … … 187 187 type->accept( pass2 ); 188 188 type->accept( pass3 ); 189 }190 191 template< typename Visitor >192 void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor, bool addBefore ) {189 } 190 191 template< typename Visitor > 192 void acceptAndAdd( std::list< Declaration * > &translationUnit, Visitor &visitor, bool addBefore ) { 193 193 std::list< Declaration * >::iterator i = translationUnit.begin(); 194 194 while ( i != translationUnit.end() ) { … … 201 201 i = next; 202 202 } // while 203 }204 205 void HoistStruct::hoistStruct( std::list< Declaration * > &translationUnit ) {203 } 204 205 void HoistStruct::hoistStruct( std::list< Declaration * > &translationUnit ) { 206 206 HoistStruct hoister; 207 207 acceptAndAdd( translationUnit, hoister, true ); 208 }209 210 HoistStruct::HoistStruct() : inStruct( false ) {211 }212 213 void filter( std::list< Declaration * > &declList, bool (*pred)( Declaration * ), bool doDelete ) {208 } 209 210 HoistStruct::HoistStruct() : inStruct( false ) { 211 } 212 213 void filter( std::list< Declaration * > &declList, bool (*pred)( Declaration * ), bool doDelete ) { 214 214 std::list< Declaration * >::iterator i = declList.begin(); 215 215 while ( i != declList.end() ) { … … 224 224 i = next; 225 225 } // while 226 }227 228 bool isStructOrUnion( Declaration *decl ) {226 } 227 228 bool isStructOrUnion( Declaration *decl ) { 229 229 return dynamic_cast< StructDecl * >( decl ) || dynamic_cast< UnionDecl * >( decl ); 230 }231 232 template< typename AggDecl >233 void HoistStruct::handleAggregate( AggDecl *aggregateDecl ) {230 } 231 232 template< typename AggDecl > 233 void HoistStruct::handleAggregate( AggDecl *aggregateDecl ) { 234 234 if ( inStruct ) { 235 235 // Add elements in stack order corresponding to nesting structure. … … 243 243 // Always remove the hoisted aggregate from the inner structure. 244 244 filter( aggregateDecl->get_members(), isStructOrUnion, false ); 245 }246 247 void HoistStruct::visit( StructDecl *aggregateDecl ) {245 } 246 247 void HoistStruct::visit( StructDecl *aggregateDecl ) { 248 248 handleAggregate( aggregateDecl ); 249 }250 251 void HoistStruct::visit( UnionDecl *aggregateDecl ) {249 } 250 251 void HoistStruct::visit( UnionDecl *aggregateDecl ) { 252 252 handleAggregate( aggregateDecl ); 253 }254 255 void HoistStruct::visit( CompoundStmt *compoundStmt ) {253 } 254 255 void HoistStruct::visit( CompoundStmt *compoundStmt ) { 256 256 addVisit( compoundStmt, *this ); 257 }258 259 void HoistStruct::visit( IfStmt *ifStmt ) {257 } 258 259 void HoistStruct::visit( IfStmt *ifStmt ) { 260 260 addVisit( ifStmt, *this ); 261 }262 263 void HoistStruct::visit( WhileStmt *whileStmt ) {261 } 262 263 void HoistStruct::visit( WhileStmt *whileStmt ) { 264 264 addVisit( whileStmt, *this ); 265 }266 267 void HoistStruct::visit( ForStmt *forStmt ) {265 } 266 267 void HoistStruct::visit( ForStmt *forStmt ) { 268 268 addVisit( forStmt, *this ); 269 }270 271 void HoistStruct::visit( SwitchStmt *switchStmt ) {269 } 270 271 void HoistStruct::visit( SwitchStmt *switchStmt ) { 272 272 addVisit( switchStmt, *this ); 273 }274 275 void HoistStruct::visit( ChooseStmt *switchStmt ) {273 } 274 275 void HoistStruct::visit( ChooseStmt *switchStmt ) { 276 276 addVisit( switchStmt, *this ); 277 }278 279 void HoistStruct::visit( CaseStmt *caseStmt ) {277 } 278 279 void HoistStruct::visit( CaseStmt *caseStmt ) { 280 280 addVisit( caseStmt, *this ); 281 }282 283 void HoistStruct::visit( CatchStmt *cathStmt ) {281 } 282 283 void HoistStruct::visit( CatchStmt *cathStmt ) { 284 284 addVisit( cathStmt, *this ); 285 }286 287 void Pass1::visit( EnumDecl *enumDecl ) {285 } 286 287 void Pass1::visit( EnumDecl *enumDecl ) { 288 288 // Set the type of each member of the enumeration to be EnumConstant 289 289 … … 294 294 } // for 295 295 Parent::visit( enumDecl ); 296 }297 298 namespace {296 } 297 298 namespace { 299 299 template< typename DWTIterator > 300 300 void fixFunctionList( DWTIterator begin, DWTIterator end, FunctionType *func ) { … … 323 323 } // if 324 324 } 325 }326 327 void Pass1::visit( FunctionType *func ) {325 } 326 327 void Pass1::visit( FunctionType *func ) { 328 328 // Fix up parameters and return types 329 329 fixFunctionList( func->get_parameters().begin(), func->get_parameters().end(), func ); 330 330 fixFunctionList( func->get_returnVals().begin(), func->get_returnVals().end(), func ); 331 331 Visitor::visit( func ); 332 }333 334 Pass2::Pass2( bool doDebug, const Indexer *other_indexer ) : Indexer( doDebug ) {332 } 333 334 Pass2::Pass2( bool doDebug, const Indexer *other_indexer ) : Indexer( doDebug ) { 335 335 if ( other_indexer ) { 336 336 indexer = other_indexer; … … 338 338 indexer = this; 339 339 } // if 340 }341 342 void Pass2::visit( StructInstType *structInst ) {340 } 341 342 void Pass2::visit( StructInstType *structInst ) { 343 343 Parent::visit( structInst ); 344 344 StructDecl *st = indexer->lookupStruct( structInst->get_name() ); … … 352 352 forwardStructs[ structInst->get_name() ].push_back( structInst ); 353 353 } // if 354 }355 356 void Pass2::visit( UnionInstType *unionInst ) {354 } 355 356 void Pass2::visit( UnionInstType *unionInst ) { 357 357 Parent::visit( unionInst ); 358 358 UnionDecl *un = indexer->lookupUnion( unionInst->get_name() ); … … 365 365 forwardUnions[ unionInst->get_name() ].push_back( unionInst ); 366 366 } // if 367 }368 369 void Pass2::visit( ContextInstType *contextInst ) {367 } 368 369 void Pass2::visit( ContextInstType *contextInst ) { 370 370 Parent::visit( contextInst ); 371 371 ContextDecl *ctx = indexer->lookupContext( contextInst->get_name() ); … … 383 383 } // for 384 384 applySubstitution( ctx->get_parameters().begin(), ctx->get_parameters().end(), contextInst->get_parameters().begin(), ctx->get_members().begin(), ctx->get_members().end(), back_inserter( contextInst->get_members() ) ); 385 }386 387 void Pass2::visit( StructDecl *structDecl ) {385 } 386 387 void Pass2::visit( StructDecl *structDecl ) { 388 388 if ( ! structDecl->get_members().empty() ) { 389 389 ForwardStructsType::iterator fwds = forwardStructs.find( structDecl->get_name() ); … … 396 396 } // if 397 397 Indexer::visit( structDecl ); 398 }399 400 void Pass2::visit( UnionDecl *unionDecl ) {398 } 399 400 void Pass2::visit( UnionDecl *unionDecl ) { 401 401 if ( ! unionDecl->get_members().empty() ) { 402 402 ForwardUnionsType::iterator fwds = forwardUnions.find( unionDecl->get_name() ); … … 409 409 } // if 410 410 Indexer::visit( unionDecl ); 411 }412 413 void Pass2::visit( TypeInstType *typeInst ) {411 } 412 413 void Pass2::visit( TypeInstType *typeInst ) { 414 414 if ( NamedTypeDecl *namedTypeDecl = lookupType( typeInst->get_name() ) ) { 415 415 if ( TypeDecl *typeDecl = dynamic_cast< TypeDecl * >( namedTypeDecl ) ) { … … 417 417 } // if 418 418 } // if 419 }420 421 Pass3::Pass3( const Indexer *other_indexer ) : Indexer( false ) {419 } 420 421 Pass3::Pass3( const Indexer *other_indexer ) : Indexer( false ) { 422 422 if ( other_indexer ) { 423 423 indexer = other_indexer; … … 425 425 indexer = this; 426 426 } // if 427 }428 429 void forallFixer( Type *func ) {427 } 428 429 void forallFixer( Type *func ) { 430 430 // Fix up assertions 431 431 for ( std::list< TypeDecl * >::iterator type = func->get_forall().begin(); type != func->get_forall().end(); ++type ) { … … 454 454 } // while 455 455 } // for 456 }457 458 void Pass3::visit( ObjectDecl *object ) {456 } 457 458 void Pass3::visit( ObjectDecl *object ) { 459 459 forallFixer( object->get_type() ); 460 460 if ( PointerType *pointer = dynamic_cast< PointerType * >( object->get_type() ) ) { … … 463 463 Parent::visit( object ); 464 464 object->fixUniqueId(); 465 }466 467 void Pass3::visit( FunctionDecl *func ) {465 } 466 467 void Pass3::visit( FunctionDecl *func ) { 468 468 forallFixer( func->get_type() ); 469 469 Parent::visit( func ); 470 470 func->fixUniqueId(); 471 }472 473 static const std::list< std::string > noLabels;474 475 void AddStructAssignment::addStructAssignment( std::list< Declaration * > &translationUnit ) {471 } 472 473 static const std::list< std::string > noLabels; 474 475 void AddStructAssignment::addStructAssignment( std::list< Declaration * > &translationUnit ) { 476 476 AddStructAssignment visitor; 477 477 acceptAndAdd( translationUnit, visitor, false ); 478 }479 480 template< typename OutputIterator >481 void makeScalarAssignment( ObjectDecl *srcParam, ObjectDecl *dstParam, DeclarationWithType *member, OutputIterator out ) {478 } 479 480 template< typename OutputIterator > 481 void makeScalarAssignment( ObjectDecl *srcParam, ObjectDecl *dstParam, DeclarationWithType *member, OutputIterator out ) { 482 482 ObjectDecl *obj = dynamic_cast<ObjectDecl *>( member ); 483 483 // unnamed bit fields are not copied as they cannot be accessed … … 497 497 498 498 *out++ = new ExprStmt( noLabels, assignExpr ); 499 }500 501 template< typename OutputIterator >502 void makeArrayAssignment( ObjectDecl *srcParam, ObjectDecl *dstParam, DeclarationWithType *member, ArrayType *array, OutputIterator out ) {499 } 500 501 template< typename OutputIterator > 502 void makeArrayAssignment( ObjectDecl *srcParam, ObjectDecl *dstParam, DeclarationWithType *member, ArrayType *array, OutputIterator out ) { 503 503 static UniqueName indexName( "_index" ); 504 504 … … 539 539 540 540 *out++ = new ForStmt( noLabels, initStmt, cond, inc, new ExprStmt( noLabels, assignExpr ) ); 541 }542 543 Declaration *makeStructAssignment( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting ) {541 } 542 543 Declaration *makeStructAssignment( StructDecl *aggregateDecl, StructInstType *refType, unsigned int functionNesting ) { 544 544 FunctionType *assignType = new FunctionType( Type::Qualifiers(), false ); 545 545 … … 570 570 571 571 return assignDecl; 572 }573 574 Declaration *makeUnionAssignment( UnionDecl *aggregateDecl, UnionInstType *refType, unsigned int functionNesting ) {572 } 573 574 Declaration *makeUnionAssignment( UnionDecl *aggregateDecl, UnionInstType *refType, unsigned int functionNesting ) { 575 575 FunctionType *assignType = new FunctionType( Type::Qualifiers(), false ); 576 576 … … 598 598 599 599 return assignDecl; 600 }601 602 void AddStructAssignment::visit( StructDecl *structDecl ) {600 } 601 602 void AddStructAssignment::visit( StructDecl *structDecl ) { 603 603 if ( ! structDecl->get_members().empty() && structsDone.find( structDecl->get_name() ) == structsDone.end() ) { 604 604 StructInstType *structInst = new StructInstType( Type::Qualifiers(), structDecl->get_name() ); … … 607 607 structsDone.insert( structDecl->get_name() ); 608 608 } // if 609 }610 611 void AddStructAssignment::visit( UnionDecl *unionDecl ) {609 } 610 611 void AddStructAssignment::visit( UnionDecl *unionDecl ) { 612 612 if ( ! unionDecl->get_members().empty() ) { 613 613 UnionInstType *unionInst = new UnionInstType( Type::Qualifiers(), unionDecl->get_name() ); … … 615 615 declsToAdd.push_back( makeUnionAssignment( unionDecl, unionInst, functionNesting ) ); 616 616 } // if 617 }618 619 void AddStructAssignment::visit( TypeDecl *typeDecl ) {617 } 618 619 void AddStructAssignment::visit( TypeDecl *typeDecl ) { 620 620 CompoundStmt *stmts = 0; 621 621 TypeInstType *typeInst = new TypeInstType( Type::Qualifiers(), typeDecl->get_name(), false ); … … 636 636 FunctionDecl *func = new FunctionDecl( "?=?", Declaration::NoStorageClass, LinkageSpec::AutoGen, type, stmts, false ); 637 637 declsToAdd.push_back( func ); 638 }639 640 void addDecls( std::list< Declaration * > &declsToAdd, std::list< Statement * > &statements, std::list< Statement * >::iterator i ) {638 } 639 640 void addDecls( std::list< Declaration * > &declsToAdd, std::list< Statement * > &statements, std::list< Statement * >::iterator i ) { 641 641 if ( ! declsToAdd.empty() ) { 642 642 for ( std::list< Declaration * >::iterator decl = declsToAdd.begin(); decl != declsToAdd.end(); ++decl ) { … … 645 645 declsToAdd.clear(); 646 646 } // if 647 }648 649 void AddStructAssignment::visit( FunctionType *) {647 } 648 649 void AddStructAssignment::visit( FunctionType *) { 650 650 // ensure that we don't add assignment ops for types defined as part of the function 651 }652 653 void AddStructAssignment::visit( PointerType *) {651 } 652 653 void AddStructAssignment::visit( PointerType *) { 654 654 // ensure that we don't add assignment ops for types defined as part of the pointer 655 }656 657 void AddStructAssignment::visit( ContextDecl *) {655 } 656 657 void AddStructAssignment::visit( ContextDecl *) { 658 658 // ensure that we don't add assignment ops for types defined as part of the context 659 }660 661 template< typename StmtClass >662 inline void AddStructAssignment::visitStatement( StmtClass *stmt ) {659 } 660 661 template< typename StmtClass > 662 inline void AddStructAssignment::visitStatement( StmtClass *stmt ) { 663 663 std::set< std::string > oldStructs = structsDone; 664 664 addVisit( stmt, *this ); 665 665 structsDone = oldStructs; 666 }667 668 void AddStructAssignment::visit( FunctionDecl *functionDecl ) {666 } 667 668 void AddStructAssignment::visit( FunctionDecl *functionDecl ) { 669 669 maybeAccept( functionDecl->get_functionType(), *this ); 670 670 acceptAll( functionDecl->get_oldDecls(), *this ); … … 672 672 maybeAccept( functionDecl->get_statements(), *this ); 673 673 functionNesting -= 1; 674 }675 676 void AddStructAssignment::visit( CompoundStmt *compoundStmt ) {674 } 675 676 void AddStructAssignment::visit( CompoundStmt *compoundStmt ) { 677 677 visitStatement( compoundStmt ); 678 }679 680 void AddStructAssignment::visit( IfStmt *ifStmt ) {678 } 679 680 void AddStructAssignment::visit( IfStmt *ifStmt ) { 681 681 visitStatement( ifStmt ); 682 }683 684 void AddStructAssignment::visit( WhileStmt *whileStmt ) {682 } 683 684 void AddStructAssignment::visit( WhileStmt *whileStmt ) { 685 685 visitStatement( whileStmt ); 686 }687 688 void AddStructAssignment::visit( ForStmt *forStmt ) {686 } 687 688 void AddStructAssignment::visit( ForStmt *forStmt ) { 689 689 visitStatement( forStmt ); 690 }691 692 void AddStructAssignment::visit( SwitchStmt *switchStmt ) {690 } 691 692 void AddStructAssignment::visit( SwitchStmt *switchStmt ) { 693 693 visitStatement( switchStmt ); 694 }695 696 void AddStructAssignment::visit( ChooseStmt *switchStmt ) {694 } 695 696 void AddStructAssignment::visit( ChooseStmt *switchStmt ) { 697 697 visitStatement( switchStmt ); 698 }699 700 void AddStructAssignment::visit( CaseStmt *caseStmt ) {698 } 699 700 void AddStructAssignment::visit( CaseStmt *caseStmt ) { 701 701 visitStatement( caseStmt ); 702 }703 704 void AddStructAssignment::visit( CatchStmt *cathStmt ) {702 } 703 704 void AddStructAssignment::visit( CatchStmt *cathStmt ) { 705 705 visitStatement( cathStmt ); 706 }707 708 bool isTypedef( Declaration *decl ) {706 } 707 708 bool isTypedef( Declaration *decl ) { 709 709 return dynamic_cast< TypedefDecl * >( decl ); 710 }711 712 void EliminateTypedef::eliminateTypedef( std::list< Declaration * > &translationUnit ) {710 } 711 712 void EliminateTypedef::eliminateTypedef( std::list< Declaration * > &translationUnit ) { 713 713 EliminateTypedef eliminator; 714 714 mutateAll( translationUnit, eliminator ); 715 715 filter( translationUnit, isTypedef, true ); 716 }717 718 Type *EliminateTypedef::mutate( TypeInstType *typeInst ) {716 } 717 718 Type *EliminateTypedef::mutate( TypeInstType *typeInst ) { 719 719 std::map< std::string, TypedefDecl * >::const_iterator def = typedefNames.find( typeInst->get_name() ); 720 720 if ( def != typedefNames.end() ) { … … 725 725 } // if 726 726 return typeInst; 727 }728 729 Declaration *EliminateTypedef::mutate( TypedefDecl *tyDecl ) {727 } 728 729 Declaration *EliminateTypedef::mutate( TypedefDecl *tyDecl ) { 730 730 Declaration *ret = Mutator::mutate( tyDecl ); 731 731 typedefNames[ tyDecl->get_name() ] = tyDecl; … … 745 745 return ret; 746 746 } // if 747 }748 749 TypeDecl *EliminateTypedef::mutate( TypeDecl *typeDecl ) {747 } 748 749 TypeDecl *EliminateTypedef::mutate( TypeDecl *typeDecl ) { 750 750 std::map< std::string, TypedefDecl * >::iterator i = typedefNames.find( typeDecl->get_name() ); 751 751 if ( i != typedefNames.end() ) { … … 753 753 } // if 754 754 return typeDecl; 755 }756 757 DeclarationWithType *EliminateTypedef::mutate( FunctionDecl *funcDecl ) {755 } 756 757 DeclarationWithType *EliminateTypedef::mutate( FunctionDecl *funcDecl ) { 758 758 std::map< std::string, TypedefDecl * > oldNames = typedefNames; 759 759 DeclarationWithType *ret = Mutator::mutate( funcDecl ); 760 760 typedefNames = oldNames; 761 761 return ret; 762 }763 764 ObjectDecl *EliminateTypedef::mutate( ObjectDecl *objDecl ) {762 } 763 764 ObjectDecl *EliminateTypedef::mutate( ObjectDecl *objDecl ) { 765 765 std::map< std::string, TypedefDecl * > oldNames = typedefNames; 766 766 ObjectDecl *ret = Mutator::mutate( objDecl ); 767 767 typedefNames = oldNames; 768 768 return ret; 769 }770 771 Expression *EliminateTypedef::mutate( CastExpr *castExpr ) {769 } 770 771 Expression *EliminateTypedef::mutate( CastExpr *castExpr ) { 772 772 std::map< std::string, TypedefDecl * > oldNames = typedefNames; 773 773 Expression *ret = Mutator::mutate( castExpr ); 774 774 typedefNames = oldNames; 775 775 return ret; 776 }777 778 CompoundStmt *EliminateTypedef::mutate( CompoundStmt *compoundStmt ) {776 } 777 778 CompoundStmt *EliminateTypedef::mutate( CompoundStmt *compoundStmt ) { 779 779 std::map< std::string, TypedefDecl * > oldNames = typedefNames; 780 780 CompoundStmt *ret = Mutator::mutate( compoundStmt ); … … 793 793 typedefNames = oldNames; 794 794 return ret; 795 }795 } 796 796 } // namespace SymTab 797 797
Note:
See TracChangeset
for help on using the changeset viewer.