mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-29 18:49:42 +00:00
Fixed problem where functions without body produced an empty block.
This commit is contained in:
parent
f2314caadb
commit
0f7c6733f7
@ -31,6 +31,9 @@ public class Pass1GenerateControlFlowGraph extends Pass1Base {
|
||||
for(Procedure procedure : allProcedures) {
|
||||
final ProcedureCompilation procedureCompilation = getProgram().getProcedureCompilation(procedure.getRef());
|
||||
final StatementSequence sequence = procedureCompilation.getStatementSequence();
|
||||
if(sequence.getStatements().size()==0)
|
||||
// Empry procedures should not produce any blocks
|
||||
continue;
|
||||
ControlFlowBlock currentBlock = null;
|
||||
ControlFlowBlock procBlock = getOrCreateBlock(procedure.getLabel().getRef(), procedure.getRef());
|
||||
currentBlock = procBlock;
|
||||
|
Loading…
Reference in New Issue
Block a user