gccgoexportdata

package
v0.0.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package gccgoexportdata provides functions for reading export data files containing type information produced by the gccgo compiler.

This package is a stop-gap until such time as gccgo uses the same export data format as gc; see Go issue 17573. Once that occurs, this package will be deprecated and eventually deleted.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompilerInfo

func CompilerInfo(gccgo string, args ...string) (version, triple string, dirs []string, err error)

CompilerInfo executes the specified gccgo compiler and returns information about it: its version (e.g. "4.8.0"), its target triple (e.g. "x86_64-unknown-linux-gnu"), and the list of directories it searches to find standard packages. The given arguments are passed directly to calls to the specified gccgo compiler.

func NewReader

func NewReader(r io.Reader) (io.Reader, error)

NewReader returns a reader for the export data section of an object (.o) or archive (.a) file read from r.

func Read

func Read(in io.Reader, _ *token.FileSet, imports map[string]*types.Package, path string) (*types.Package, error)

Read reads export data from in, decodes it, and returns type information for the package. The package name is specified by path.

The FileSet parameter is currently unused but exists for symmetry with gcexportdata.

Read may inspect and add to the imports map to ensure that references within the export data to other packages are consistent. The caller must ensure that imports[path] does not exist, or exists but is incomplete (see types.Package.Complete), and Read inserts the resulting package into this map entry.

On return, the state of the reader is undefined.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL