Changeset 4e08a54 for src/SymTab


Ignore:
Timestamp:
Apr 19, 2024, 12:01:34 PM (22 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master, stuck-waitfor-destruct
Children:
b9b6efb
Parents:
da87eaf (diff), 02c80cdc (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

Location:
src/SymTab
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/GenImplicitCall.cpp

    rda87eaf r4e08a54  
    133133
    134134        ast::ptr< ast::DeclWithType > index = new ast::ObjectDecl(
    135                 loc, indexName.newName(), new ast::BasicType( ast::BasicType::SignedInt ),
     135                loc, indexName.newName(), new ast::BasicType( ast::BasicKind::SignedInt ),
    136136                new ast::SingleInit( loc, begin ) );
    137137        ast::ptr< ast::Expr > indexVar = new ast::VariableExpr( loc, index );
  • src/SymTab/Mangler.cc

    rda87eaf r4e08a54  
    5858        void postvisit( const ast::OneType * oneType );
    5959        void postvisit( const ast::QualifiedType * qualType );
    60 
    61         void postvisit( const ast::EnumPosType * posType );
     60        void postvisit( const ast::EnumAttrType * posType );
    6261
    6362        /// The result is the current constructed mangled name.
     
    143142void Mangler::postvisit( const ast::BasicType * basicType ) {
    144143        printQualifiers( basicType );
    145         assertf( basicType->kind < ast::BasicType::NUMBER_OF_BASIC_TYPES, "Unhandled basic type: %d", basicType->kind );
     144        assertf( basicType->kind < ast::BasicKind::NUMBER_OF_BASIC_TYPES, "Unhandled basic type: %d", basicType->kind );
    146145        mangleName += Encoding::basicTypes[ basicType->kind ];
    147146}
     
    281280}
    282281
    283 void Mangler::postvisit( const ast::EnumPosType * pos ) {
    284         postvisit( pos->instance );
    285         mangleName += "_pos";
     282void 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
    286298}
    287299
  • src/SymTab/ManglerCommon.cc

    rda87eaf r4e08a54  
    4141//   - "Di" char32_t
    4242//   - "Ds" char16_t
    43 const std::string basicTypes[ast::BasicType::NUMBER_OF_BASIC_TYPES] = {
     43const std::string basicTypes[ast::BasicKind::NUMBER_OF_BASIC_TYPES] = {
    4444        "b",        // _Bool
    4545        "c",        // char
     
    8181// GENERATED END
    8282static_assert(
    83         sizeof(basicTypes) / sizeof(basicTypes[0]) == ast::BasicType::NUMBER_OF_BASIC_TYPES,
     83        sizeof(basicTypes) / sizeof(basicTypes[0]) == ast::BasicKind::NUMBER_OF_BASIC_TYPES,
    8484        "Each basic type kind should have a corresponding mangler letter"
    8585);
Note: See TracChangeset for help on using the changeset viewer.