Changeset acb33f15 for src/SymTab


Ignore:
Timestamp:
May 13, 2024, 10:26:52 AM (8 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
31f4837
Parents:
41c8312
Message:

Change enum conversion steps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Mangler.cc

    r41c8312 racb33f15  
    5858        void postvisit( const ast::OneType * oneType );
    5959        void postvisit( const ast::QualifiedType * qualType );
    60         void postvisit( const ast::EnumAttrType * posType );
    6160
    6261        /// The result is the current constructed mangled name.
     
    278277        assertf( decl->kind < ast::TypeDecl::Kind::NUMBER_OF_KINDS, "Unhandled type variable kind: %d", decl->kind );
    279278        mangleName += Encoding::typeVariables[ decl->kind ] + std::to_string( decl->name.length() ) + decl->name;
    280 }
    281 
    282 void Mangler::postvisit( const ast::EnumAttrType * enumAttr ) {
    283         postvisit( enumAttr->instance );
    284         // mangleName += "_pos";
    285         switch ( enumAttr->attr )
    286         {
    287                 case ast::EnumAttribute::Label:
    288                         mangleName += "_label_";
    289                         break;
    290                 case ast::EnumAttribute::Posn:
    291                         mangleName += "_posn_";
    292                         break;
    293                 case ast::EnumAttribute::Value:
    294                         mangleName += "_value_";
    295                         break;
    296         }
    297 
    298279}
    299280
Note: See TracChangeset for help on using the changeset viewer.