diff options
Diffstat (limited to 'transform/optimizer.go')
-rw-r--r-- | transform/optimizer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/transform/optimizer.go b/transform/optimizer.go index 9c77c312d..917083ce8 100644 --- a/transform/optimizer.go +++ b/transform/optimizer.go @@ -158,7 +158,7 @@ func Optimize(mod llvm.Module, config *compileopts.Config, optLevel, sizeLevel i // After TinyGo-specific transforms have finished, undo exporting these functions. for _, name := range getFunctionsUsedInTransforms(config) { fn := mod.NamedFunction(name) - if fn.IsNil() { + if fn.IsNil() || fn.IsDeclaration() { continue } fn.SetLinkage(llvm.InternalLinkage) |