Ignore:
Timestamp:
Jun 2, 2022, 3:11:21 PM (23 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
ced5e2a
Parents:
015925a (diff), fc134a48 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    r015925a re5d9274  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed May  1 15:24:00 2019
    13 // Update Count     : 23
     12// Last Modified On : Fri May 20 11:18:00 2022
     13// Update Count     : 24
    1414//
    1515#include "GenType.h"
     
    5050                void postvisit( TraitInstType * inst );
    5151                void postvisit( TypeofType * typeof );
     52                void postvisit( VTableType * vtable );
    5253                void postvisit( QualifiedType * qualType );
    5354
     
    259260                        if ( options.genC ) {
    260261                                typeString = "enum " + typeString;
    261                         } 
    262                 } 
     262                        }
     263                }
    263264                handleQualifiers( enumInst );
    264265        }
    265266
    266267        void GenType::postvisit( TypeInstType * typeInst ) {
     268                assertf( ! options.genC, "Type instance types should not reach code generation." );
    267269                typeString = typeInst->name + " " + typeString;
    268270                handleQualifiers( typeInst );
     
    320322        }
    321323
     324        void GenType::postvisit( VTableType * vtable ) {
     325                assertf( ! options.genC, "Virtual table types should not reach code generation." );
     326                std::ostringstream os;
     327                os << "vtable(" << genType( vtable->base, "", options ) << ") " << typeString;
     328                typeString = os.str();
     329                handleQualifiers( vtable );
     330        }
     331
    322332        void GenType::postvisit( QualifiedType * qualType ) {
    323333                assertf( ! options.genC, "Qualified types should not reach code generation." );
Note: See TracChangeset for help on using the changeset viewer.