Changeset b16923d


Ignore:
Timestamp:
Jun 26, 2018, 4:26:09 PM (3 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
450805a
Parents:
3fd8b0e
git-author:
Rob Schluntz <rschlunt@…> (06/26/18 16:25:30)
git-committer:
Rob Schluntz <rschlunt@…> (06/26/18 16:26:09)
Message:

Fix type linking for empty SUEs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    r3fd8b0e rb16923d  
    7777class SwitchStmt;
    7878
    79 #define debugPrint( x ) if ( doDebug ) { std::cout << x; }
     79#define debugPrint( x ) if ( doDebug ) x
    8080
    8181namespace SymTab {
     
    207207                typedef std::unique_ptr<TypedefDecl> TypedefDeclPtr;
    208208                typedef ScopedMap< std::string, std::pair< TypedefDeclPtr, int > > TypedefMap;
    209                 typedef std::map< std::string, TypeDecl * > TypeDeclMap;
     209                typedef std::map< std::string, TypeDecl * > TypeDeclMap; // xxx - convert to ScopedMap
    210210                TypedefMap typedefNames;
    211211                TypeDeclMap typedeclNames;
     
    561561        void LinkReferenceToTypes::postvisit( EnumDecl *enumDecl ) {
    562562                // visit enum members first so that the types of self-referencing members are updated properly
    563                 if ( ! enumDecl->members.empty() ) {
     563                if ( enumDecl->body ) {
    564564                        ForwardEnumsType::iterator fwds = forwardEnums.find( enumDecl->name );
    565565                        if ( fwds != forwardEnums.end() ) {
     
    601601                // visit struct members first so that the types of self-referencing members are updated properly
    602602                // xxx - need to ensure that type parameters match up between forward declarations and definition (most importantly, number of type parameters and their defaults)
    603                 if ( ! structDecl->members.empty() ) {
     603                if ( structDecl->body ) {
    604604                        ForwardStructsType::iterator fwds = forwardStructs.find( structDecl->name );
    605605                        if ( fwds != forwardStructs.end() ) {
     
    613613
    614614        void LinkReferenceToTypes::postvisit( UnionDecl *unionDecl ) {
    615                 if ( ! unionDecl->members.empty() ) {
     615                if ( unionDecl->body ) {
    616616                        ForwardUnionsType::iterator fwds = forwardUnions.find( unionDecl->name );
    617617                        if ( fwds != forwardUnions.end() ) {
Note: See TracChangeset for help on using the changeset viewer.