ir_generator

package
v0.0.0-...-5c22fd7 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BearCC

type BearCC struct {
	Directory string   `json:"directory"`
	Args      []string `json:"arguments"`
	File      string   `json:"file"`
}

func (*BearCC) AddFlags

func (c *BearCC) AddFlags(flags ...string)

func (*BearCC) DropFlags

func (c *BearCC) DropFlags(flags ...string)

func (*BearCC) GetDirectory

func (c *BearCC) GetDirectory() string

func (*BearCC) GetFile

func (c *BearCC) GetFile() string

func (*BearCC) GetTarget

func (c *BearCC) GetTarget() string

func (*BearCC) ReplaceCompiler

func (c *BearCC) ReplaceCompiler(newcompiler string)

func (*BearCC) ReplaceTargetExt

func (c *BearCC) ReplaceTargetExt(newext string)

func (*BearCC) Run

func (c *BearCC) Run() error

func (*BearCC) SplitArgs

func (c *BearCC) SplitArgs() []string

func (*BearCC) String

func (c *BearCC) String() string

func (*BearCC) SwitchToC99

func (c *BearCC) SwitchToC99()

func (*BearCC) SwitchToO0

func (c *BearCC) SwitchToO0()

type BuildOptions

type BuildOptions struct {
	Opt
	SolveHeaderNotFound bool
	SkipFailure         bool
	Incremental         bool
	Jobs                int
	Style               CCStyle
}

type CCStyle

type CCStyle int
const (
	CMakeStyle CCStyle = iota
	BearStyle
	AutoStyle
)

type CMakeCC

type CMakeCC struct {
	Directory string `json:"directory"`
	Command   string `json:"command"`
	File      string `json:"file"`
}

func (*CMakeCC) AddFlags

func (c *CMakeCC) AddFlags(flags ...string)

func (*CMakeCC) DropFlags

func (c *CMakeCC) DropFlags(flags ...string)

func (*CMakeCC) GetDirectory

func (c *CMakeCC) GetDirectory() string

func (*CMakeCC) GetFile

func (c *CMakeCC) GetFile() string

func (*CMakeCC) GetTarget

func (c *CMakeCC) GetTarget() string

func (*CMakeCC) ReplaceCompiler

func (c *CMakeCC) ReplaceCompiler(newcompiler string)

func (*CMakeCC) ReplaceTargetExt

func (c *CMakeCC) ReplaceTargetExt(newext string)

func (*CMakeCC) Run

func (c *CMakeCC) Run() error

func (*CMakeCC) SplitArgs

func (c *CMakeCC) SplitArgs() []string

func (*CMakeCC) String

func (c *CMakeCC) String() string

func (*CMakeCC) SwitchToC99

func (c *CMakeCC) SwitchToC99()

func (*CMakeCC) SwitchToO0

func (c *CMakeCC) SwitchToO0()

type CompilerCommand

type CompilerCommand interface {
	SplitArgs() []string

	Run() error
	AddFlags(flags ...string)
	DropFlags(flags ...string)
	ReplaceCompiler(newcompiler string)
	ReplaceTargetExt(newext string)
	SwitchToO0()
	SwitchToC99()

	GetFile() string
	GetTarget() string
	GetDirectory() string
	String() string
}

type CompilerDatabase

type CompilerDatabase struct {
	BuildOptions
	Commands []CompilerCommand
	TopDir   string
	// contains filtered or unexported fields
}

func NewCompilerDataBase

func NewCompilerDataBase() *CompilerDatabase

func (*CompilerDatabase) Dump

func (d *CompilerDatabase) Dump()

func (*CompilerDatabase) EmitClangAST

func (d *CompilerDatabase) EmitClangAST(clang string)

func (*CompilerDatabase) EmitLLVM

func (d *CompilerDatabase) EmitLLVM(clang string)

func (*CompilerDatabase) GetAllExistTargets

func (d *CompilerDatabase) GetAllExistTargets() []string
func (d *CompilerDatabase) LLVMLink(output string) error

func (*CompilerDatabase) Load

func (d *CompilerDatabase) Load(ccjson string)

func (*CompilerDatabase) Rewrite

func (d *CompilerDatabase) Rewrite(ccjson string)

func (*CompilerDatabase) Run

func (d *CompilerDatabase) Run()

func (*CompilerDatabase) RunOnly

func (d *CompilerDatabase) RunOnly(file string)

func (*CompilerDatabase) RunParallel

func (d *CompilerDatabase) RunParallel()

type LLVMDis

type LLVMDis struct {
	Name   string
	Input  string
	Output string
}

func NewDefaultLLVMDis

func NewDefaultLLVMDis(input, output string) *LLVMDis

func (*LLVMDis) NeedRun

func (d *LLVMDis) NeedRun() bool

func (*LLVMDis) Run

func (d *LLVMDis) Run() error

type Linker

type Linker struct {
	Name            string
	Output          string
	DisableOverride bool
	Targets         []string
}

func NewLLVMLinker

func NewLLVMLinker() *Linker
func (l *Linker) Link() error

type Opt

type Opt struct {
	Name string

	EnableOptModuleSummary bool
	EnableOptMem2Reg       bool
	// contains filtered or unexported fields
}

func NewDefaultOpt

func NewDefaultOpt() *Opt

func NewOpt

func NewOpt(opt Opt) *Opt

func (*Opt) NeedRun

func (o *Opt) NeedRun() bool

func (*Opt) Run

func (o *Opt) Run(target, directory string) error

Jump to

Keyboard shortcuts

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