mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
24 lines
369 B
Plaintext
24 lines
369 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
struct Test
|
|
{
|
|
int a;
|
|
String b;
|
|
}
|
|
fn int main()
|
|
{
|
|
bool a = $defined(Test a = {"hello"});
|
|
bool b = $defined((Test){"hello"});
|
|
return 0;
|
|
}
|
|
/* #expect: test.ll
|
|
|
|
define i32 @main() #0 {
|
|
entry:
|
|
%a = alloca i8, align 1
|
|
%b = alloca i8, align 1
|
|
store i8 0, ptr %a, align 1
|
|
store i8 0, ptr %b, align 1
|
|
ret i32 0
|
|
}
|