ccir

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: BSD-3-Clause Imports: 16 Imported by: 0

README

ccir

Package ccir translates cc ASTs to internal representation. (Work In Progress)

Installation

$ go get github.com/next-bin/go-sqlite/v2/ccir

Documentation: pkg.go.dev/github.com/next-bin/go-sqlite/v2/ccir

Based on modernc.org/sqlite by CZ.NIC z.s.p.o.

Documentation

Overview

Package ccir translates cc[0] ASTs to an intermediate representation. (Work In Progress)

Supported platforms and architectures

In GOOS_GOARCH form

linux_386
linux_amd64
windows_386
windows_amd64

If you can access a machine with a not yet supported os/arch and you would like to contribute to porting this package, you may want to start by trying

$ cd $GOPATH/src/github.com/next-bin/go-sqlite/v2/ccir/libc
$ go generate

Please fill an issue for the port and let's discuss it there.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Testing amends things for tests.
	Testing bool
	// CRT0Path points to the C _start function source file. R/O.
	CRT0Path string
	// LibcIncludePath can be used as an argument to cc.SysIncludePaths. R/O.
	LibcIncludePath string
)

Functions

func New

func New(ast *cc.TranslationUnit, opts ...Option) (_ []ir.Object, err error)

New returns ir.Objects generated from ast or an error, if any. It's the

func NewModel

func NewModel() (*cc.Model, error)

NewModel returns a *cc.Model for the current architecture and platform.

func TODO

func TODO(more ...interface{}) string

TODO remove me.

Types

type Option

type Option func(*options) error

Option is a configuration/setup function that can be passed to the New function.

func TypeCache

func TypeCache(tc ir.TypeCache) Option

TypeCache option requests to use a shared type cache tc.

Jump to

Keyboard shortcuts

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