Files
llgo/compiler/cl/_testdata/importpkg/out.ll

40 lines
2.3 KiB
LLVM
Raw Normal View History

; ModuleID = 'github.com/goplus/llgo/compiler/cl/_testdata/importpkg'
source_filename = "github.com/goplus/llgo/compiler/cl/_testdata/importpkg"
2024-04-22 20:09:23 +08:00
@"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello" = global [7 x i8] zeroinitializer, align 1
@"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init$guard" = global i1 false, align 1
2024-04-22 20:09:23 +08:00
define void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init"() {
2024-04-22 20:09:23 +08:00
_llgo_0:
%0 = load i1, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init$guard", align 1
2024-04-22 20:09:23 +08:00
br i1 %0, label %_llgo_2, label %_llgo_1
_llgo_1: ; preds = %_llgo_0
store i1 true, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.init$guard", align 1
2025-01-09 00:47:45 +08:00
call void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.init"()
store i8 72, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", align 1
store i8 101, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 1), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 2), align 1
store i8 108, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 3), align 1
store i8 111, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 4), align 1
store i8 10, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 5), align 1
store i8 0, ptr getelementptr inbounds (i8, ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello", i64 6), align 1
2024-04-22 20:09:23 +08:00
br label %_llgo_2
_llgo_2: ; preds = %_llgo_1, %_llgo_0
ret void
}
define void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.main"() {
2024-04-22 20:09:23 +08:00
_llgo_0:
%0 = call i64 @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.Max"(i64 2, i64 100)
call void (ptr, ...) @printf(ptr @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg.hello")
ret void
2024-04-22 20:09:23 +08:00
}
2025-01-09 00:47:45 +08:00
declare void @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.init"()
2024-04-22 20:09:23 +08:00
2025-01-09 00:47:45 +08:00
declare i64 @"github.com/goplus/llgo/compiler/cl/_testdata/importpkg/stdio.Max"(i64, i64)
2024-04-24 14:27:14 +08:00
2024-04-22 20:09:23 +08:00
declare void @printf(ptr, ...)