-
Notifications
You must be signed in to change notification settings - Fork 47
stdlib-opt: trim runtime/internal/lib patches #1621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 69 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
ad08fb6
trim internal packages for llgo/darwin
cpunion 38d8f8c
exclude internal/goarch for llgo/darwin
cpunion 02f159b
use stdlib sync on llgo/darwin
cpunion 2886c0d
use stdlib time on llgo/darwin
cpunion b545d46
refine llgo runtime timers and monotonic time
cpunion dc7c9ff
improve timer seq handling for stdlib time
cpunion f24ed70
align timer delay and stop semantics
cpunion f1d5808
match timer send semantics more closely
cpunion 788beb1
Handle asynctimerchan=2 in llgo timers
cpunion fe73f46
Trim alt pkgs for md5/sha1/crc32
cpunion cace980
Use stdlib os/signal on llgo darwin
cpunion 8a8c2f7
Switch internal/cpu and runtime/debug to stdlib
cpunion 414da26
Linux llgo support with GOOS-specific alt packages
cpunion e69df24
runtime: add math overlay and keep sync/atomic alt
cpunion 87adbf0
runtime: wire linknames and internal syscall alt
cpunion 3ae59f3
clite: update libuv and pthread align stubs
cpunion 6ee7bde
doc: add stdlib opt dev notes
cpunion 95e0b4c
runtime/internal/lib: gofmt and tag cleanup
cpunion 491d2b7
dev: always install llgo in setup
cpunion 9992b48
cl/testlibgo: update expected llvm ir
cpunion 161a635
runtime/internal/lib: remove unused patch packages
cpunion 490221f
runtime/internal/lib: restore bytealg and itoa
cpunion ed3a53e
runtime/internal/lib: restore sync patch and fix syscall6 build tag
cpunion dbfc4e4
runtime/internal/lib: restore weak/unique/maps and sync patch
cpunion aacc938
runtime: fix darwin syscall errors and exec hooks
cpunion 63c2914
runtime: add math modf overlay for llgo
cpunion eb348a8
runtime: restrict modf overlay to asm arches
cpunion 7440808
runtime: restrict darwin syscall intrinsics to darwin
cpunion a4df43a
add llgo runtime/internal/syscall for linux
cpunion dc2296a
restore internal/bytealg alt package
cpunion 0a31979
add linux syscall hooks and math overlays
cpunion e1f4f68
drop llgo build tags under runtime
cpunion a175681
fix fastrand linknames and md5 overlay
cpunion 2ab04a4
unify alt pkg list and drop llgo build tags
cpunion 4068080
remove runtime trace stub
cpunion 6e57ef0
add go1.21.13 dev dockerfile
cpunion 9fb8e88
add go1.21.13 docker service
cpunion 1ebde19
add md5 purego overlay and relax go1.21 dockerfile
cpunion 71a73f9
support go1.21 in local_ci
cpunion b685c37
apply go1.21 modfile to llgo runs
cpunion 2b3732e
force local toolchain for go1.21 in local_ci
cpunion c6755e3
detect go version without toolchain auto-upgrade
cpunion d6db334
use .mod suffix for go1.21 modfile
cpunion e0a7bb3
runtime: add md5 stubs and timer split
cpunion 7a0bc5e
dev: install llgo with dev tags
cpunion c23570c
doc: explain stdlib syscall trampolines
cpunion 0f33de8
cl: fix syscall trampolines and darwin wrappers
cpunion c064a88
runtime: use fork for linux rawVforkSyscall
cpunion c8f5f94
runtime: add internal/weak alt pkg
cpunion b91f146
runtime: add internal/weak alt package
cpunion 00d5378
doc: trim syscall notes and update proposal
cpunion 5d4a9b8
cl: unify syscall intrinsic
cpunion 85ececd
cl: alias syscall intrinsics and fix darwin wrappers
cpunion bc345d6
cl: skip trampoline stubs in codegen
cpunion cdf71b2
test: generate missing expect.txt
cpunion becb819
runtime: clean unused time, syscall
cpunion 9b99ac1
runtime: remove unused pkgs
cpunion df39996
runtime: clean empty asm files
cpunion b063cf5
cl: remove unnecessary trampoline. prefix handing
cpunion aafe37b
cl: revert unnecessary changes
cpunion 483f25a
cl: llgo.funcPCABI0 cover func/closure
cpunion 236821e
cl: test llgo.skip with return values
cpunion 618bb71
cl: reduce syscall instruction count
cpunion b7dd978
cl: remove unreachable code
cpunion 0c38765
cl: cover c function trampoline
cpunion ea4ae8e
cl: document syscall intrinsic lowering helpers
cpunion 8a7412e
cl: remove unused llgo.getClosurePtr/setClosurePtr
cpunion 848f13f
chore(dev): drop dev/ tooling changes (moved to separate branch)
cpunion 8ca6f83
doc(runtime): audit runtime/internal/lib patches
cpunion 12046e4
Merge remote-tracking branch 'goplus/main' into stdlib-opt-trim-inter…
cpunion b3ad65e
runtime/trace: add missing user event stubs for llgo
cpunion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "syscall" | ||
| "unsafe" | ||
|
|
||
| "github.com/goplus/lib/c" | ||
| ) | ||
|
|
||
| func printErr(prefix string, err error) { | ||
| if err == nil { | ||
| return | ||
| } | ||
| if errno, ok := err.(syscall.Errno); ok { | ||
| c.Printf(c.Str("%s: errno=%d\n"), c.AllocaCStr(prefix), errno) | ||
| return | ||
| } | ||
| c.Printf(c.Str("%s: error\n"), c.AllocaCStr(prefix)) | ||
| } | ||
|
|
||
| func main() { | ||
| pid := syscall.Getpid() | ||
| c.Printf(c.Str("pid=%d\n"), pid) | ||
|
|
||
| if wd, err := syscall.Getwd(); err != nil { | ||
| printErr("getwd", err) | ||
| } else { | ||
| c.Printf(c.Str("cwd=%s\n"), c.AllocaCStr(wd)) | ||
| } | ||
|
|
||
| fd, err := syscall.Open("/etc/hosts", 0, 0) | ||
| if err != nil { | ||
| printErr("open /etc/hosts", err) | ||
| return | ||
| } | ||
|
|
||
| var buf [128]byte | ||
| if n, err := syscall.Read(fd, buf[:]); err != nil { | ||
| printErr("read /etc/hosts", err) | ||
| } else { | ||
| c.Printf(c.Str("read=%d\n"), n) | ||
| if n > 0 { | ||
| c.Printf(c.Str("head: %.*s\n"), n, (*c.Char)(unsafe.Pointer(&buf[0]))) | ||
| } | ||
| } | ||
| _ = syscall.Close(fd) | ||
| } | ||
Empty file.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| package llgointrinsics | ||
|
|
||
| import ( | ||
| "unsafe" | ||
| ) | ||
|
|
||
| //go:linkname funcPCABI0 llgo.funcPCABI0 | ||
| func funcPCABI0(fn interface{}) uintptr | ||
|
|
||
| //go:linkname skip llgo.skip | ||
| func skip() | ||
|
|
||
| //go:linkname skipWithRet llgo.skip | ||
| func skipWithRet() uintptr | ||
|
|
||
| //go:linkname skipWithMultiRet llgo.skip | ||
| func skipWithMultiRet() (uintptr, uintptr) | ||
|
|
||
| //go:linkname libc_foo_trampoline C.foo | ||
| func libc_foo_trampoline() | ||
|
|
||
| //go:linkname bar_trampoline bar_trampoline | ||
| func bar_trampoline() | ||
|
|
||
| //go:linkname write C.write | ||
| func write(fd int, buf unsafe.Pointer, count int) int | ||
|
|
||
| //go:linkname write_trampoline C.write | ||
| func write_trampoline() | ||
|
|
||
| func UseC() uintptr { | ||
| return funcPCABI0(write) | ||
| } | ||
|
|
||
| func UseCTrampoline() uintptr { | ||
| return funcPCABI0(write_trampoline) | ||
| } | ||
|
|
||
| func UseLibc() uintptr { | ||
| return funcPCABI0(libc_foo_trampoline) | ||
| } | ||
|
|
||
| func UseBare() uintptr { | ||
| return funcPCABI0(bar_trampoline) | ||
| } | ||
|
|
||
| func UseFunc() uintptr { | ||
| return funcPCABI0(func() {}) | ||
| } | ||
|
|
||
| func UseClosure() uintptr { | ||
| var x int | ||
| return funcPCABI0(func() { | ||
| x++ | ||
| }) | ||
| } | ||
|
|
||
| func UseSkip() { | ||
| skip() | ||
| i := skipWithRet() | ||
| print(i) | ||
| a, b := skipWithMultiRet() | ||
| print(a, b) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| ; ModuleID = 'github.com/goplus/llgo/cl/_testdata/llgointrinsics' | ||
| source_filename = "github.com/goplus/llgo/cl/_testdata/llgointrinsics" | ||
|
|
||
| @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.init$guard" = global i1 false, align 1 | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseBare"() { | ||
| _llgo_0: | ||
| ret i64 ptrtoint (ptr @bar to i64) | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseC"() { | ||
| _llgo_0: | ||
| ret i64 ptrtoint (ptr @write to i64) | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseCTrampoline"() { | ||
| _llgo_0: | ||
| ret i64 ptrtoint (ptr @write to i64) | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseClosure"() { | ||
| _llgo_0: | ||
| %0 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64 8) | ||
| %1 = call ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64 8) | ||
| %2 = getelementptr inbounds { ptr }, ptr %1, i32 0, i32 0 | ||
| store ptr %0, ptr %2, align 8 | ||
| %3 = insertvalue { ptr, ptr } { ptr @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseClosure$1", ptr undef }, ptr %1, 1 | ||
| ret i64 ptrtoint (ptr @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseClosure$1" to i64) | ||
| } | ||
|
|
||
| define void @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseClosure$1"(ptr %0) { | ||
| _llgo_0: | ||
| %1 = load { ptr }, ptr %0, align 8 | ||
| %2 = extractvalue { ptr } %1, 0 | ||
| %3 = load i64, ptr %2, align 4 | ||
| %4 = add i64 %3, 1 | ||
| %5 = extractvalue { ptr } %1, 0 | ||
| store i64 %4, ptr %5, align 4 | ||
| ret void | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseFunc"() { | ||
| _llgo_0: | ||
| ret i64 ptrtoint (ptr @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseFunc$1" to i64) | ||
| } | ||
|
|
||
| define void @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseFunc$1"() { | ||
| _llgo_0: | ||
| ret void | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseLibc"() { | ||
| _llgo_0: | ||
| ret i64 ptrtoint (ptr @foo to i64) | ||
| } | ||
|
|
||
| define void @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.UseSkip"() { | ||
| _llgo_0: | ||
| call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 0) | ||
| call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 0) | ||
| call void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64 0) | ||
| ret void | ||
| } | ||
|
|
||
| define void @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.init"() { | ||
| _llgo_0: | ||
| %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.init$guard", align 1 | ||
| br i1 %0, label %_llgo_2, label %_llgo_1 | ||
|
|
||
| _llgo_1: ; preds = %_llgo_0 | ||
| store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/llgointrinsics.init$guard", align 1 | ||
| br label %_llgo_2 | ||
|
|
||
| _llgo_2: ; preds = %_llgo_1, %_llgo_0 | ||
| ret void | ||
| } | ||
|
|
||
| declare i64 @bar(...) | ||
|
|
||
| declare i64 @write(i64, ptr, i64) | ||
|
|
||
| declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocZ"(i64) | ||
|
|
||
| declare ptr @"github.com/goplus/llgo/runtime/internal/runtime.AllocU"(i64) | ||
|
|
||
| declare i64 @foo(...) | ||
|
|
||
| declare void @"github.com/goplus/llgo/runtime/internal/runtime.PrintUint"(i64) |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package llgosyscall | ||
|
|
||
| import _ "unsafe" | ||
|
|
||
| //go:linkname syscall llgo.syscall | ||
| func syscall(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr) | ||
|
|
||
| //go:linkname syscall6 llgo.syscall | ||
| func syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) | ||
|
|
||
| //go:linkname syscall6X llgo.syscall | ||
| func syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) | ||
|
|
||
| //go:linkname syscallPtr llgo.syscall | ||
| func syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr) | ||
|
|
||
| //go:linkname rawSyscall llgo.syscall | ||
| func rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2, err uintptr) | ||
|
|
||
| //go:linkname rawSyscall6 llgo.syscall | ||
| func rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) | ||
|
|
||
| func Use() uintptr { | ||
| r1, _, _ := syscall(0, 1, 2, 3) | ||
| return r1 | ||
| } | ||
|
|
||
| func Use6() uintptr { | ||
| r1, _, _ := syscall6(0, 1, 2, 3, 4, 5, 6) | ||
| return r1 | ||
| } | ||
|
|
||
| func Use6X() uintptr { | ||
| r1, _, _ := syscall6X(0, 1, 2, 3, 4, 5, 6) | ||
| return r1 | ||
| } | ||
|
|
||
| func UsePtr() uintptr { | ||
| r1, _, _ := syscallPtr(0, 1, 2, 3) | ||
| return r1 | ||
| } | ||
|
|
||
| func UseRaw() uintptr { | ||
| r1, _, _ := rawSyscall(0, 1, 2, 3) | ||
| return r1 | ||
| } | ||
|
|
||
| func UseRaw6() uintptr { | ||
| r1, _, _ := rawSyscall6(0, 1, 2, 3, 4, 5, 6) | ||
| return r1 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| ; ModuleID = 'github.com/goplus/llgo/cl/_testdata/llgosyscall' | ||
| source_filename = "github.com/goplus/llgo/cl/_testdata/llgosyscall" | ||
|
|
||
| @"github.com/goplus/llgo/cl/_testdata/llgosyscall.init$guard" = global i1 false, align 1 | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgosyscall.Use"() { | ||
| _llgo_0: | ||
| %0 = call i64 null(i64 1, i64 2, i64 3) | ||
| %1 = icmp eq i64 %0, -1 | ||
| %2 = call i32 @cliteErrno() | ||
| %3 = sext i32 %2 to i64 | ||
| %4 = select i1 %1, i64 %3, i64 0 | ||
| %5 = insertvalue { i64, i64, i64 } undef, i64 %0, 0 | ||
| %6 = insertvalue { i64, i64, i64 } %5, i64 0, 1 | ||
| %7 = insertvalue { i64, i64, i64 } %6, i64 %4, 2 | ||
| %8 = extractvalue { i64, i64, i64 } %7, 0 | ||
| %9 = extractvalue { i64, i64, i64 } %7, 1 | ||
| %10 = extractvalue { i64, i64, i64 } %7, 2 | ||
| ret i64 %8 | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgosyscall.Use6"() { | ||
| _llgo_0: | ||
| %0 = call i64 null(i64 1, i64 2, i64 3, i64 4, i64 5, i64 6) | ||
| %1 = icmp eq i64 %0, -1 | ||
| %2 = call i32 @cliteErrno() | ||
| %3 = sext i32 %2 to i64 | ||
| %4 = select i1 %1, i64 %3, i64 0 | ||
| %5 = insertvalue { i64, i64, i64 } undef, i64 %0, 0 | ||
| %6 = insertvalue { i64, i64, i64 } %5, i64 0, 1 | ||
| %7 = insertvalue { i64, i64, i64 } %6, i64 %4, 2 | ||
| %8 = extractvalue { i64, i64, i64 } %7, 0 | ||
| %9 = extractvalue { i64, i64, i64 } %7, 1 | ||
| %10 = extractvalue { i64, i64, i64 } %7, 2 | ||
| ret i64 %8 | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgosyscall.Use6X"() { | ||
| _llgo_0: | ||
| %0 = call i64 null(i64 1, i64 2, i64 3, i64 4, i64 5, i64 6) | ||
| %1 = icmp eq i64 %0, -1 | ||
| %2 = call i32 @cliteErrno() | ||
| %3 = sext i32 %2 to i64 | ||
| %4 = select i1 %1, i64 %3, i64 0 | ||
| %5 = insertvalue { i64, i64, i64 } undef, i64 %0, 0 | ||
| %6 = insertvalue { i64, i64, i64 } %5, i64 0, 1 | ||
| %7 = insertvalue { i64, i64, i64 } %6, i64 %4, 2 | ||
| %8 = extractvalue { i64, i64, i64 } %7, 0 | ||
| %9 = extractvalue { i64, i64, i64 } %7, 1 | ||
| %10 = extractvalue { i64, i64, i64 } %7, 2 | ||
| ret i64 %8 | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgosyscall.UsePtr"() { | ||
| _llgo_0: | ||
| %0 = call i64 null(i64 1, i64 2, i64 3) | ||
| %1 = icmp eq i64 %0, -1 | ||
| %2 = call i32 @cliteErrno() | ||
| %3 = sext i32 %2 to i64 | ||
| %4 = select i1 %1, i64 %3, i64 0 | ||
| %5 = insertvalue { i64, i64, i64 } undef, i64 %0, 0 | ||
| %6 = insertvalue { i64, i64, i64 } %5, i64 0, 1 | ||
| %7 = insertvalue { i64, i64, i64 } %6, i64 %4, 2 | ||
| %8 = extractvalue { i64, i64, i64 } %7, 0 | ||
| %9 = extractvalue { i64, i64, i64 } %7, 1 | ||
| %10 = extractvalue { i64, i64, i64 } %7, 2 | ||
| ret i64 %8 | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgosyscall.UseRaw"() { | ||
| _llgo_0: | ||
| %0 = call i64 null(i64 1, i64 2, i64 3) | ||
| %1 = icmp eq i64 %0, -1 | ||
| %2 = call i32 @cliteErrno() | ||
| %3 = sext i32 %2 to i64 | ||
| %4 = select i1 %1, i64 %3, i64 0 | ||
| %5 = insertvalue { i64, i64, i64 } undef, i64 %0, 0 | ||
| %6 = insertvalue { i64, i64, i64 } %5, i64 0, 1 | ||
| %7 = insertvalue { i64, i64, i64 } %6, i64 %4, 2 | ||
| %8 = extractvalue { i64, i64, i64 } %7, 0 | ||
| %9 = extractvalue { i64, i64, i64 } %7, 1 | ||
| %10 = extractvalue { i64, i64, i64 } %7, 2 | ||
| ret i64 %8 | ||
| } | ||
|
|
||
| define i64 @"github.com/goplus/llgo/cl/_testdata/llgosyscall.UseRaw6"() { | ||
| _llgo_0: | ||
| %0 = call i64 null(i64 1, i64 2, i64 3, i64 4, i64 5, i64 6) | ||
| %1 = icmp eq i64 %0, -1 | ||
| %2 = call i32 @cliteErrno() | ||
| %3 = sext i32 %2 to i64 | ||
| %4 = select i1 %1, i64 %3, i64 0 | ||
| %5 = insertvalue { i64, i64, i64 } undef, i64 %0, 0 | ||
| %6 = insertvalue { i64, i64, i64 } %5, i64 0, 1 | ||
| %7 = insertvalue { i64, i64, i64 } %6, i64 %4, 2 | ||
| %8 = extractvalue { i64, i64, i64 } %7, 0 | ||
| %9 = extractvalue { i64, i64, i64 } %7, 1 | ||
| %10 = extractvalue { i64, i64, i64 } %7, 2 | ||
| ret i64 %8 | ||
| } | ||
|
|
||
| define void @"github.com/goplus/llgo/cl/_testdata/llgosyscall.init"() { | ||
| _llgo_0: | ||
| %0 = load i1, ptr @"github.com/goplus/llgo/cl/_testdata/llgosyscall.init$guard", align 1 | ||
| br i1 %0, label %_llgo_2, label %_llgo_1 | ||
|
|
||
| _llgo_1: ; preds = %_llgo_0 | ||
| store i1 true, ptr @"github.com/goplus/llgo/cl/_testdata/llgosyscall.init$guard", align 1 | ||
| br label %_llgo_2 | ||
|
|
||
| _llgo_2: ; preds = %_llgo_1, %_llgo_0 | ||
| ret void | ||
| } | ||
|
|
||
| declare i32 @cliteErrno() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| modified |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.