aboutsummaryrefslogtreecommitdiff
path: root/libgo/go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2020-10-26 16:48:03 -0700
committerIan Lance Taylor <iant@golang.org>2020-10-27 11:03:11 -0700
commitb7ac5fdbe7352bd33f6e9f8629d1140f278060cb (patch)
treed3b27f28217b8c585d29e0eb4ddb148faa6da911 /libgo/go
parent6f33e2d8427f347ed265e1c0e11523a650e465a6 (diff)
downloadgcc-b7ac5fdbe7352bd33f6e9f8629d1140f278060cb.zip
gcc-b7ac5fdbe7352bd33f6e9f8629d1140f278060cb.tar.gz
gcc-b7ac5fdbe7352bd33f6e9f8629d1140f278060cb.tar.bz2
compiler, go/internal/gccgoimporter: export notinheap annotation
This is the gofrontend version of https://golang.org/cl/259297. This is required now because that change is in the 1.15.3 release. This requires changing the go/internal/gccgoimporter package, to skip the new annotation. This change will need to be ported to the gc and x/tools repos. For golang/go#41761 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265258
Diffstat (limited to 'libgo/go')
-rw-r--r--libgo/go/go/internal/gccgoimporter/parser.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgo/go/go/internal/gccgoimporter/parser.go b/libgo/go/go/internal/gccgoimporter/parser.go
index e2ef33f..1b1d07d 100644
--- a/libgo/go/go/internal/gccgoimporter/parser.go
+++ b/libgo/go/go/internal/gccgoimporter/parser.go
@@ -517,6 +517,13 @@ func (p *parser) parseNamedType(nlist []interface{}) types.Type {
p.errorf("%v has nil type", obj)
}
+ if p.tok == scanner.Ident && p.lit == "notinheap" {
+ p.next()
+ // The go/types package has no way of recording that
+ // this type is marked notinheap. Presumably no user
+ // of this package actually cares.
+ }
+
// type alias
if p.tok == '=' {
p.next()