gentests; MakeBody fix

This commit is contained in:
xushiwei
2024-05-24 09:41:40 +08:00
parent 77eeea95c7
commit d2e5bb99ef
2 changed files with 3 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ func main() {
llgenDir(dir + "/cl/_testlibc")
llgenDir(dir + "/cl/_testrt")
llgenDir(dir + "/cl/_testgo")
llgenDir(dir+"/cl/_testpy", "")
llgenDir(dir+"/cl/_testdata", "")
}

View File

@@ -287,7 +287,8 @@ func (p Function) HasBody() bool {
func (p Function) MakeBody(nblk int) Builder {
p.MakeBlocks(nblk)
b := p.NewBuilder()
b.impl.SetInsertPointAtEnd(p.blks[0].last)
b.blk = p.blks[0]
b.impl.SetInsertPointAtEnd(b.blk.last)
return b
}