Changeset c194661 for src/CodeGen


Ignore:
Timestamp:
Jun 20, 2018, 11:23:42 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
0b3b2ae
Parents:
9a7a3b6
Message:

Reorganize QualifiedType node

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    r9a7a3b6 rc194661  
    4848                void postvisit( ZeroType * zeroType );
    4949                void postvisit( OneType * oneType );
     50                void postvisit( GlobalScopeType * globalType );
    5051                void postvisit( TraitInstType * inst );
    5152                void postvisit( TypeofType * typeof );
     53                void postvisit( QualifiedType * qualType );
    5254
    5355          private:
     
    291293        }
    292294
     295        void GenType::postvisit( GlobalScopeType * globalType ) {
     296                assertf( ! genC, "Global scope type should not reach code generation." );
     297                handleQualifiers( globalType );
     298        }
     299
    293300        void GenType::postvisit( TraitInstType * inst ) {
    294301                assertf( ! genC, "Trait types should not reach code generation." );
     
    307314        }
    308315
     316        void GenType::postvisit( QualifiedType * qualType ) {
     317                assertf( ! genC, "Qualified types should not reach code generation." );
     318                std::ostringstream os;
     319                os << genType( qualType->parent, "", pretty, genC, lineMarks ) << "." << genType( qualType->child, "", pretty, genC, lineMarks );
     320                typeString = os.str();
     321                handleQualifiers( qualType );
     322        }
     323
    309324        void GenType::handleQualifiers( Type * type ) {
    310325                if ( type->get_const() ) {
Note: See TracChangeset for help on using the changeset viewer.