Changeset 5f98ce5 for src/SymTab
- Timestamp:
- Jul 19, 2016, 7:09:30 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 40e636a
- Parents:
- 2be1023
- Location:
- src/SymTab
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
r2be1023 r5f98ce5 26 26 27 27 namespace SymTab { 28 Type * SizeType = 0; 29 28 30 class AutogenerateRoutines : public Visitor { 29 31 public: -
src/SymTab/Autogen.h
r2be1023 r5f98ce5 29 29 /// returns true if obj's name is the empty string and it has a bitfield width 30 30 bool isUnnamedBitfield( ObjectDecl * obj ); 31 32 /// size_t type - set when size_t typedef is seen. Useful in a few places, 33 /// such as in determining array dimension type 34 extern Type * SizeType; 31 35 32 36 /// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls. -
src/SymTab/Validate.cc
r2be1023 r5f98ce5 174 174 175 175 virtual void visit( FunctionDecl *funcDecl ); 176 };176 }; 177 177 178 178 class CompoundLiteral : public GenPoly::DeclMutator { … … 490 490 EliminateTypedef eliminator; 491 491 mutateAll( translationUnit, eliminator ); 492 if ( eliminator.typedefNames.count( "size_t" ) ) { 493 // grab and remember declaration of size_t 494 SizeType = eliminator.typedefNames["size_t"].first->get_base()->clone(); 495 } else { 496 assert( false && "missing global typedef for size_t" ); 497 } 492 498 filter( translationUnit, isTypedef, true ); 499 493 500 } 494 501 … … 518 525 Declaration *EliminateTypedef::mutate( TypedefDecl * tyDecl ) { 519 526 Declaration *ret = Mutator::mutate( tyDecl ); 527 520 528 if ( typedefNames.count( tyDecl->get_name() ) == 1 && typedefNames[ tyDecl->get_name() ].second == scopeLevel ) { 521 529 // typedef to the same name from the same scope
Note: See TracChangeset
for help on using the changeset viewer.