]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: allow inlining of functions that declare a const
authorTodd Neal <todd@tneal.org>
Wed, 16 Mar 2016 23:44:17 +0000 (18:44 -0500)
committerRobert Griesemer <gri@golang.org>
Fri, 18 Mar 2016 23:26:36 +0000 (23:26 +0000)
commitfc6bcdee7926925efc1305ad17d8b784e0e071fa
tree113fb8bd15d7068c9252ee8e374fe679baea3da6
parent3dd4f74e060b02031497ae839e698f3ddce5d73d
cmd/compile: allow inlining of functions that declare a const

Consider functions with an ODCLCONST for inlining and modify exprfmt to
ignore those nodes when exporting. Don't add symbols to the export list
if there is no definition.  This occurs when OLITERAL symbols are looked
up via Pkglookup for non-exported symbols.

Fixes #7655

Change-Id: I1de827850f4c69e58107447314fe7433e378e069
Reviewed-on: https://go-review.googlesource.com/20773
Run-TryBot: Todd Neal <todd@tneal.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/bexport.go
src/cmd/compile/internal/gc/bimport.go
src/cmd/compile/internal/gc/export.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/inl.go
test/inline.go