mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
21 lines
475 B
Plaintext
21 lines
475 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
|
|
alias IntFn = fn int();
|
|
IntFn lambda @export = fn () => 1;
|
|
IntFn lambda_naked @export = fn () @naked { asm("ret"); };
|
|
|
|
/* #expect: test.ll
|
|
|
|
; Function Attrs: naked nounwind uwtable
|
|
define internal i32 @"test.$global$lambda2"() #0 {
|
|
entry:
|
|
call void asm sideeffect alignstack "ret", "~{dirflag},~{fpsr},~{flags}"()
|
|
unreachable
|
|
}
|
|
|
|
; Function Attrs: nounwind uwtable
|
|
define internal i32 @"test.$global$lambda1"() #1 {
|
|
entry:
|
|
ret i32 1
|
|
} |