llgo/ssa.SetRuntime: prevent multiple loading of runtime

This commit is contained in:
xushiwei
2024-04-28 14:00:29 +08:00
parent 41dfafe957
commit 70623dd554
7 changed files with 35 additions and 22 deletions

View File

@@ -20,6 +20,7 @@ import (
"testing"
"github.com/goplus/llgo/cl/cltest"
"github.com/goplus/llgo/ssa"
)
func TestFromTestcgo(t *testing.T) {
@@ -31,5 +32,5 @@ func TestFromTestdata(t *testing.T) {
}
func TestRuntime(t *testing.T) {
cltest.Pkg(t, "github.com/goplus/llgo/internal/runtime", "../internal/runtime/llgo_autogen.ll")
cltest.Pkg(t, ssa.PkgRuntime, "../internal/runtime/llgo_autogen.ll")
}