mirror of
https://github.com/irmen/prog8.git
synced 2024-11-25 19:31:36 +00:00
fix
This commit is contained in:
parent
f465b2e2a0
commit
24f37e2062
@ -78,7 +78,6 @@ class IRUnusedCodeRemover(
|
||||
// check if asmsub is called from another asmsub
|
||||
irprog.blocks.asSequence().forEach { block ->
|
||||
block.children.filterIsInstance<IRAsmSubroutine>().forEach { sub ->
|
||||
require(sub.asmChunk.next == null) { "asmsubs won't be pointing to their successor, otherwise we should do more work here" }
|
||||
if (block.forceOutput || block.library)
|
||||
linkedAsmSubs += sub
|
||||
if (sub.asmChunk.isNotEmpty()) {
|
||||
@ -87,6 +86,13 @@ class IRUnusedCodeRemover(
|
||||
linkedAsmSubs += asmsub
|
||||
}
|
||||
}
|
||||
val inlineAsm = sub.asmChunk.next as? IRInlineAsmChunk
|
||||
if(inlineAsm!=null) {
|
||||
allSubs.forEach { (label, asmsub) ->
|
||||
if (inlineAsm.assembly.contains(label))
|
||||
linkedAsmSubs += asmsub
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user