mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
23 lines
339 B
Plaintext
23 lines
339 B
Plaintext
// #target: macos-x64
|
|
module test;
|
|
|
|
macro foo($bar, $Type)
|
|
{
|
|
$Type a = $bar;
|
|
return $bar;
|
|
}
|
|
|
|
fn void bar()
|
|
{
|
|
int x = foo($bar: 167, $Type: int);
|
|
}
|
|
|
|
/* #expect: test.ll
|
|
|
|
define void @test.bar() #0 {
|
|
entry:
|
|
%x = alloca i32, align 4
|
|
%a = alloca i32, align 4
|
|
store i32 167, ptr %a, align 4
|
|
store i32 167, ptr %x, align 4
|
|
ret void |