Source file src/cmd/compile/internal/ir/package.go
1 // Copyright 2020 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package ir 6 7 import "cmd/compile/internal/types" 8 9 // A Package holds information about the package being compiled. 10 type Package struct { 11 // Imports, listed in source order. 12 // See golang.org/issue/31636. 13 Imports []*types.Pkg 14 15 // Init functions, listed in source order. 16 Inits []*Func 17 18 // Top-level declarations. 19 Decls []Node 20 21 // Extern (package global) declarations. 22 Externs []Node 23 24 // Assembly function declarations. 25 Asms []*Name 26 27 // Cgo directives. 28 CgoPragmas [][]string 29 30 // Variables with //go:embed lines. 31 Embeds []*Name 32 33 // Exported (or re-exported) symbols. 34 Exports []*Name 35 } 36