Ignore:
Timestamp:
Jun 7, 2016, 3:59:15 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, 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:
d0f8b19
Parents:
db175c8
Message:

change type of enumerator to EnumInstType?, allow casting between EnumInstType? and BasicType?, add common type code for EnumInstType? and BasicType?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Validate.cc

    rdb175c8 ra436947  
    279279        void Pass1::visit( EnumDecl *enumDecl ) {
    280280                // Set the type of each member of the enumeration to be EnumConstant
    281 
    282281                for ( std::list< Declaration * >::iterator i = enumDecl->get_members().begin(); i != enumDecl->get_members().end(); ++i ) {
    283282                        ObjectDecl * obj = dynamic_cast< ObjectDecl * >( *i );
    284283                        assert( obj );
    285                         // obj->set_type( new EnumInstType( Type::Qualifiers( true, false, false, false, false, false ), enumDecl->get_name() ) );
    286                         BasicType * enumType = new BasicType( Type::Qualifiers(), BasicType::SignedInt );
    287                         obj->set_type( enumType ) ;
     284                        obj->set_type( new EnumInstType( Type::Qualifiers( true, false, false, false, false, false ), enumDecl->get_name() ) );
    288285                } // for
    289286                Parent::visit( enumDecl );
Note: See TracChangeset for help on using the changeset viewer.