Changeset 0bd46fd for src/CodeGen/CodeGenerator.cc
- Timestamp:
- Sep 21, 2022, 10:52:51 AM (20 months ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 7f6a7c9, e01eb4a
- Parents:
- 20737104
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r20737104 r0bd46fd 277 277 std::list< Declaration* > &memb = enumDecl->get_members(); 278 278 if (enumDecl->base && ! memb.empty()) { 279 unsigned long long last_val = -1; // if the first enum value has no explicit initializer, 280 // as other 279 unsigned long long last_val = -1; // if the first enum value has no explicit initializer, 280 // as other 281 281 for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end(); i++) { 282 282 ObjectDecl * obj = dynamic_cast< ObjectDecl* >( *i ); 283 283 assert( obj ); 284 output << "static const";285 output << genType(enumDecl->base, "", options) << " ";284 output << "static "; 285 output << genType(enumDecl->base, "", options) << " const "; 286 286 output << mangleName( obj ) << " "; 287 287 output << " = "; … … 914 914 } 915 915 916 // QualifiedNameExpr should not reach to CodeGen. 916 // QualifiedNameExpr should not reach to CodeGen. 917 917 // FixQualifiedName Convert QualifiedNameExpr to VariableExpr 918 918 void CodeGenerator::postvisit( QualifiedNameExpr * expr ) {
Note: See TracChangeset
for help on using the changeset viewer.