added %jmptable

This commit is contained in:
Irmen de Jong
2025-02-09 15:02:59 +01:00
parent 8d2410622c
commit efd41260f2
19 changed files with 112 additions and 40 deletions
@@ -101,7 +101,7 @@ class UnusedCodeRemover(private val program: Program,
}
if (callgraph.unused(block)) {
if (block.statements.any { it !is VarDecl || it.type == VarDeclType.VAR } && "ignore_unused" !in block.options()) {
if (!block.statements.any { it is Subroutine && it.hasBeenInlined })
if (!block.statements.any { it is Subroutine && !it.hasBeenInlined })
errors.info("removing unused block '${block.name}'", block.position)
}
if (!block.statements.any { it is Subroutine && it.hasBeenInlined }) {