mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Passing a single value to @wasm would ignore the renaming
This commit is contained in:
31
test/test_suite/abi/wasm_attribute.c3t
Normal file
31
test/test_suite/abi/wasm_attribute.c3t
Normal file
@@ -0,0 +1,31 @@
|
||||
// #target: wasm32
|
||||
module test;
|
||||
|
||||
fn int testexport(int num) @export("test_export")
|
||||
{
|
||||
return num * 100;
|
||||
}
|
||||
|
||||
fn int testwasm(int num) @wasm("test_wasm")
|
||||
{
|
||||
return num * 100;
|
||||
}
|
||||
fn int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* #expect: test.ll
|
||||
|
||||
define i32 @test_export(i32 %0) #0 {
|
||||
entry:
|
||||
%mul = mul i32 %0, 100
|
||||
ret i32 %mul
|
||||
}
|
||||
|
||||
define i32 @test_wasm(i32 %0) #1 {
|
||||
entry:
|
||||
%mul = mul i32 %0, 100
|
||||
ret i32 %mul
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user