Changeset d8e2a09 for src/CodeGen


Ignore:
Timestamp:
Apr 10, 2022, 10:06:55 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
5bb1ac1
Parents:
92538ab
Message:

Merge with master

Location:
src/CodeGen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    r92538ab rd8e2a09  
    275275                extension( enumDecl );
    276276                std::list< Declaration* > &memb = enumDecl->get_members();
    277                 if (enumDecl->base && ! memb.empty() &&
    278                 (dynamic_cast<BasicType *>(enumDecl->base)
    279                  && !(dynamic_cast<BasicType *>(enumDecl->base)->kind == BasicType::Kind::SignedInt))) {
     277                if (enumDecl->base && ! memb.empty()) {
    280278                        ObjectDecl * last = nullptr;
    281279                        for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
  • src/CodeGen/GenType.cc

    r92538ab rd8e2a09  
    253253
    254254        void GenType::postvisit( EnumInstType * enumInst ) {
    255                 if ( enumInst->baseEnum->base
    256                 && dynamic_cast<BasicType *>(enumInst->baseEnum->base)
    257                 && dynamic_cast<BasicType *>(enumInst->baseEnum->base)->kind != BasicType::Kind::SignedInt) {
     255                if ( enumInst->baseEnum->base ) {
    258256                        typeString = genType(enumInst->baseEnum->base, "", options) + typeString;
    259257                } else {
Note: See TracChangeset for help on using the changeset viewer.