ssa: temp disable Finalize; cl: decls sort by name
This commit is contained in:
@@ -22,6 +22,10 @@ import (
|
||||
"github.com/goplus/llgo/cl/cltest"
|
||||
)
|
||||
|
||||
func TestFromTestcgo(t *testing.T) {
|
||||
cltest.FromDir(t, "", "../cl/_testcgo", true)
|
||||
}
|
||||
|
||||
func TestFromTestdata(t *testing.T) {
|
||||
cltest.FromDir(t, "", "../cl/_testdata", false)
|
||||
}
|
||||
|
||||
@@ -145,7 +145,8 @@ func (p Function) Param(i int) Expr {
|
||||
func (p Function) NewBuilder() Builder {
|
||||
prog := p.prog
|
||||
b := prog.ctx.NewBuilder()
|
||||
b.Finalize()
|
||||
// TODO(xsw): Finalize may cause panic, so comment it.
|
||||
// b.Finalize()
|
||||
return &aBuilder{b, p, prog}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,8 @@ func NewProgram(target *Target) Program {
|
||||
target = &Target{}
|
||||
}
|
||||
ctx := llvm.NewContext()
|
||||
ctx.Finalize()
|
||||
// TODO(xsw): Finalize may cause panic, so comment it.
|
||||
// ctx.Finalize()
|
||||
td := llvm.NewTargetData("") // TODO(xsw): target config
|
||||
return &aProgram{ctx: ctx, target: target, td: td}
|
||||
}
|
||||
@@ -130,7 +131,8 @@ func NewProgram(target *Target) Program {
|
||||
// NewPackage creates a new package.
|
||||
func (p Program) NewPackage(name, pkgPath string) Package {
|
||||
mod := p.ctx.NewModule(pkgPath)
|
||||
mod.Finalize()
|
||||
// TODO(xsw): Finalize may cause panic, so comment it.
|
||||
// mod.Finalize()
|
||||
fns := make(map[string]Function)
|
||||
gbls := make(map[string]Global)
|
||||
return &aPackage{mod, fns, gbls, p}
|
||||
|
||||
Reference in New Issue
Block a user