Changeset 4520b77e for src/CodeGen


Ignore:
Timestamp:
Sep 20, 2022, 8:37:05 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
a065f1f
Parents:
d489da8 (diff), 12df6fe (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 to Master Sept 19

Location:
src/CodeGen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rd489da8 r4520b77e  
    277277                std::list< Declaration* > &memb = enumDecl->get_members();
    278278                if (enumDecl->base && ! memb.empty()) {
    279                         unsigned long long last_val = -1;
     279                        unsigned long long last_val = -1; // if the first enum value has no explicit initializer,
     280                        // as other
    280281                        for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
    281282                                ObjectDecl * obj = dynamic_cast< ObjectDecl* >( *i );
     
    689690                        output << opInfo->symbol;
    690691                } else {
    691                         // if (dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())
    692                         // && dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base) {
    693                         //      output << '(' <<genType(dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base, "", options) << ')';
    694                         // }
    695692                        output << mangleName( variableExpr->get_var() );
    696693                } // if
     
    911908        }
    912909
     910        // QualifiedNameExpr should not reach to CodeGen.
     911        // FixQualifiedName Convert QualifiedNameExpr to VariableExpr
     912        void CodeGenerator::postvisit( QualifiedNameExpr * expr ) {
     913                output << "/* label */" << mangleName(expr->var);
     914        }
    913915
    914916        // *** Statements
  • src/CodeGen/CodeGenerator.h

    rd489da8 r4520b77e  
    103103                void postvisit( DefaultArgExpr * );
    104104                void postvisit( GenericExpr * );
     105                void postvisit( QualifiedNameExpr *);
    105106
    106107                //*** Statements
Note: See TracChangeset for help on using the changeset viewer.