compiler

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: BSD-3-Clause Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile added in v0.13.0

func Compile(pkgName string, machine llvm.TargetMachine, config *compileopts.Config) (llvm.Module, []string, []error)

Compile the given package path or .go file path. Return an error when this fails (in any stage). If successful it returns the LLVM module and a list of extra C files to be compiled. If not, one or more errors will be returned.

The fact that it returns a list of filenames to compile is a layering violation. Eventually, this Compile function should only compile a single package and not the whole program, and loading of the program (including CGo processing) should be moved outside the compiler package.

func NewTargetMachine added in v0.13.0

func NewTargetMachine(config *compileopts.Config) (llvm.TargetMachine, error)

NewTargetMachine returns a new llvm.TargetMachine based on the passed-in configuration. It is used by the compiler and is needed for machine code emission.

Types

This section is empty.

Directories

Path Synopsis
Package ircheck implements a checker for LLVM IR, that goes a bit further than the regular LLVM IR verifier.
Package ircheck implements a checker for LLVM IR, that goes a bit further than the regular LLVM IR verifier.
Package llvmutil contains utility functions used across multiple compiler packages.
Package llvmutil contains utility functions used across multiple compiler packages.

Jump to

Keyboard shortcuts

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