Imports #
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/typecheck"
"cmd/compile/internal/types"
"cmd/internal/objabi"
"internal/coverage"
"strconv"
"strings"
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/typecheck"
"cmd/compile/internal/types"
"cmd/internal/objabi"
"internal/coverage"
"strconv"
"strings"
names records state information collected in the first fixup phase so that it can be passed to the second fixup phase.
type names struct {
MetaVar *ir.Name
PkgIdVar *ir.Name
InitFn *ir.Func
CounterMode coverage.CounterMode
CounterGran coverage.CounterGranularity
}
Fixup adds calls to the pkg init function as appropriate to register coverage-related variables with the runtime. It also reclassifies selected variables (for example, tagging coverage counter variables with flags so that they can be handled properly downstream).
func Fixup()
addInitHookCall generates a call to runtime/coverage.initHook() and inserts it into the package main init function, which will kick off the process for coverage data writing (emit meta data, and register an exit hook to emit counter data).
func addInitHookCall(initfn *ir.Func, cmode coverage.CounterMode)
func metaHashAndLen() ([16]byte, int)
func registerMeta(cnames names, hashv [16]byte, mdlen int)
Generated with Arrow