Changeset 4520b77e for src/CodeGen
- Timestamp:
- Sep 20, 2022, 8:37:05 PM (3 years ago)
- 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. - Location:
- src/CodeGen
- Files:
-
- 2 edited
-
CodeGenerator.cc (modified) (3 diffs)
-
CodeGenerator.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rd489da8 r4520b77e 277 277 std::list< Declaration* > &memb = enumDecl->get_members(); 278 278 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 280 281 for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end(); i++) { 281 282 ObjectDecl * obj = dynamic_cast< ObjectDecl* >( *i ); … … 689 690 output << opInfo->symbol; 690 691 } 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 // }695 692 output << mangleName( variableExpr->get_var() ); 696 693 } // if … … 911 908 } 912 909 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 } 913 915 914 916 // *** Statements -
src/CodeGen/CodeGenerator.h
rd489da8 r4520b77e 103 103 void postvisit( DefaultArgExpr * ); 104 104 void postvisit( GenericExpr * ); 105 void postvisit( QualifiedNameExpr *); 105 106 106 107 //*** Statements
Note:
See TracChangeset
for help on using the changeset viewer.