mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-21 12:59:04 +00:00
passes: Fix bug in SimpleDCE
Main was included twice, leading to problems with coroutines.
This commit is contained in:
@@ -244,7 +244,7 @@ func (p *Program) SimpleDCE() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove unmarked functions.
|
// Remove unmarked functions.
|
||||||
livefunctions := []*Function{p.GetFunction(main)}
|
livefunctions := []*Function{}
|
||||||
for _, f := range p.Functions {
|
for _, f := range p.Functions {
|
||||||
if f.flag {
|
if f.flag {
|
||||||
livefunctions = append(livefunctions, f)
|
livefunctions = append(livefunctions, f)
|
||||||
|
|||||||
Reference in New Issue
Block a user