Ignore:
Timestamp:
Oct 7, 2015, 12:31:28 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
242d458
Parents:
b0be06ac
Message:

link typedecl to its implementation type, typedecl initialization hack in resolver

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    rb0be06ac r679864e1  
    1010// Created On       : Sun May 17 21:50:04 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Aug 05 14:00:24 2015
    13 // Update Count     : 195
     12// Last Modified On : Tue Oct 06 15:40:35 2015
     13// Update Count     : 219
    1414//
    1515
     
    183183
    184184                typedef std::map< std::string, std::pair< TypedefDecl *, int > > TypedefMap;
     185                typedef std::map< std::string, TypeDecl * > TypeDeclMap;
    185186                TypedefMap typedefNames;
     187                TypeDeclMap typedeclNames;
    186188                int scopeLevel;
    187189        };
     
    839841                        delete typeInst;
    840842                        return ret;
     843                } else {
     844                        TypeDeclMap::const_iterator base = typedeclNames.find( typeInst->get_name() );
     845                        assert( base != typedeclNames.end() );
     846                        typeInst->set_baseType( base->second->clone() );
    841847                } // if
    842848                return typeInst;
     
    880886                        typedefNames.erase( i ) ;
    881887                } // if
     888
     889                typedeclNames[ typeDecl->get_name() ] = typeDecl;
    882890                return typeDecl;
    883891        }
Note: See TracChangeset for help on using the changeset viewer.