llgen

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoFile

func DoFile(fileOrPkg, outFile string)

func GenFrom

func GenFrom(fileOrPkg string) string

func SmartDoFile

func SmartDoFile(pkgPath string)

func SmartDoFileAtPhase added in v1.0.2

func SmartDoFileAtPhase(pkgPath string, phase Phase)

SmartDoFileAtPhase writes the package module captured at phase.

Types

type GeneratedIR

type GeneratedIR struct {
	Text   string
	GOOS   string
	GOARCH string
	Target string
}

GeneratedIR is an LLVM IR snapshot together with its effective target.

func Generate

func Generate(fileOrPkg string) GeneratedIR

Generate returns the historical pre-target-ABI module together with its effective target. GenFrom is the text-only compatibility wrapper.

func GeneratePostABI

func GeneratePostABI(fileOrPkg string) GeneratedIR

GeneratePostABI returns the module after aggregate and target ABI lowering and before LLVM optimization. GenFrom intentionally retains its historical pre-target-ABI behavior.

func GeneratePostABIWithConf

func GeneratePostABIWithConf(fileOrPkg string, input *build.Config) GeneratedIR

GeneratePostABIWithConf is GeneratePostABI with caller-provided target and frontend settings. Any ModuleHook on input is ignored because generation manages phase capture internally.

func GenerateWithConf

func GenerateWithConf(fileOrPkg string, input *build.Config) GeneratedIR

GenerateWithConf is Generate with caller-provided target and frontend settings. Any ModuleHook on input is ignored because generation manages the hook used to capture the requested phase.

type Phase added in v1.0.2

type Phase string

Phase identifies the compiler phase at which LLVM IR is captured.

const (
	PhasePreABI  Phase = "pre-abi"
	PhasePostABI Phase = "post-abi"
)

Jump to

Keyboard shortcuts

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