gentests
This commit is contained in:
@@ -33,7 +33,7 @@ func main() {
|
||||
|
||||
llgenDir(dir + "/cl/_testlibc")
|
||||
llgenDir(dir + "/cl/_testrt")
|
||||
llgenDir(dir + "/cl/_testpy")
|
||||
llgenDir(dir+"/cl/_testpy", "")
|
||||
llgenDir(dir+"/cl/_testdata", "")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
; ModuleID = 'command-line-arguments'
|
||||
source_filename = "command-line-arguments"
|
||||
; ModuleID = 'math'
|
||||
source_filename = "math"
|
||||
|
||||
@__llgo_py.math.sqrt = external global ptr
|
||||
@"command-line-arguments.init$guard" = global ptr null
|
||||
@"math.init$guard" = global ptr null
|
||||
@__llgo_py.math = linkonce global ptr null
|
||||
@0 = private unnamed_addr constant [5 x i8] c"math\00", align 1
|
||||
@1 = private unnamed_addr constant [5 x i8] c"sqrt\00", align 1
|
||||
|
||||
define void @command-line-arguments.init() {
|
||||
define void @math.init() {
|
||||
_llgo_0:
|
||||
%0 = load i1, ptr @"command-line-arguments.init$guard", align 1
|
||||
%0 = load i1, ptr @"math.init$guard", align 1
|
||||
br i1 %0, label %_llgo_2, label %_llgo_1
|
||||
|
||||
_llgo_1: ; preds = %_llgo_0
|
||||
store i1 true, ptr @"command-line-arguments.init$guard", align 1
|
||||
store i1 true, ptr @"math.init$guard", align 1
|
||||
%1 = load ptr, ptr @__llgo_py.math, align 8
|
||||
call void (ptr, ...) @llgoLoadPyModSyms(ptr %1, ptr @1, ptr @__llgo_py.math.sqrt, ptr null)
|
||||
%2 = load ptr, ptr @__llgo_py.math, align 8
|
||||
|
||||
@@ -29,7 +29,7 @@ func testCompile(t *testing.T, src, expected string) {
|
||||
}
|
||||
|
||||
func TestFromTestpy(t *testing.T) {
|
||||
cltest.FromDir(t, "callpy", "./_testpy", false)
|
||||
cltest.FromDir(t, "", "./_testpy", false)
|
||||
}
|
||||
|
||||
func TestFromTestlibc(t *testing.T) {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -8,7 +8,7 @@ source_filename = "github.com/goplus/llgo/x/sqlite"
|
||||
define ptr @"(*github.com/goplus/llgo/x/sqlite.Errno).Errstr"(ptr %0) {
|
||||
_llgo_0:
|
||||
%1 = load i32, ptr %0, align 4
|
||||
%2 = call ptr @sqlite3_errstr()
|
||||
%2 = call ptr @sqlite3_errstr(i32 %1)
|
||||
ret ptr %2
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ _llgo_2: ; preds = %_llgo_1, %_llgo_0
|
||||
ret void
|
||||
}
|
||||
|
||||
declare ptr @sqlite3_errstr()
|
||||
declare ptr @sqlite3_errstr(i32)
|
||||
|
||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)
|
||||
|
||||
@@ -92,8 +92,8 @@ declare i32 @sqlite3_open(ptr, ptr)
|
||||
|
||||
declare i32 @sqlite3_open_v2(ptr, ptr, i32, ptr)
|
||||
|
||||
declare i32 @sqlite3_prepare(ptr, i32, ptr, ptr)
|
||||
declare i32 @sqlite3_prepare(ptr, ptr, i32, ptr, ptr)
|
||||
|
||||
declare i32 @sqlite3_prepare_v2(ptr, i32, ptr, ptr)
|
||||
declare i32 @sqlite3_prepare_v2(ptr, ptr, i32, ptr, ptr)
|
||||
|
||||
declare i32 @sqlite3_prepare_v3(ptr, i32, i32, ptr, ptr)
|
||||
declare i32 @sqlite3_prepare_v3(ptr, ptr, i32, i32, ptr, ptr)
|
||||
|
||||
Reference in New Issue
Block a user