Changeset 9506c70 for src/CodeGen
- Timestamp:
- Feb 24, 2025, 4:58:06 PM (7 months ago)
- Branches:
- master
- Children:
- b8b64c34
- Parents:
- 4be0117
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cpp
r4be0117 r9506c70 1105 1105 assertf( !options.genC, "fallthrough should not reach code generation." ); 1106 1106 output << "fallthrough"; 1107 if ( ast::BranchStmt::FallThroughDefault == stmt->kind ) { 1108 assertf( stmt->target.empty(), "fallthough default should not have a target." ); 1109 output << " default"; 1110 } 1107 1111 break; 1108 1112 default: 1109 1113 assertf( false, "Bad BranchStmt value." ); 1110 1114 } 1111 // Print branch target for labelled break/continue/fallthrough in debug mode. 1112 if ( !options.genC && stmt->kind != ast::BranchStmt::Goto ) { 1113 if ( !stmt->target.empty() ) { 1114 output << " " << stmt->target; 1115 } else if ( stmt->kind == ast::BranchStmt::FallThrough ) { 1116 output << " default"; 1117 } 1115 // Print branch target for labelled break/continue/fallthrough. 1116 if ( ast::BranchStmt::Goto != stmt->kind && !stmt->target.empty() ) { 1117 assertf( !options.genC, "labelled branch should not reach code generation. %s", stmt->target.name.c_str() ); 1118 output << " " << stmt->target; 1118 1119 } 1119 1120 output << ";";
Note:
See TracChangeset
for help on using the changeset viewer.