mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Change anyerror { i64, i64 } -> i64. Cleaned up platform data and max tls / vector align. Initial work on bitstruct (just parsing). Updated try / catch semantics.
This commit is contained in:
committed by
Christoffer Lerno
parent
95836e98a2
commit
f180a0d44a
@@ -3,7 +3,10 @@
|
||||
module foo;
|
||||
import std::io;
|
||||
|
||||
errtype Foo;
|
||||
errtype Foo
|
||||
{
|
||||
X
|
||||
}
|
||||
|
||||
define Bar = distinct int;
|
||||
|
||||
@@ -39,9 +42,9 @@ func void main()
|
||||
|
||||
// #expect: foo.ll
|
||||
|
||||
define void @foo.Foo__hello(%Foo* %0)
|
||||
%f = alloca %Foo*, align 8
|
||||
store %Foo* %0, %Foo** %f, align 8
|
||||
define void @foo.Foo__hello(i64* %0)
|
||||
%f = alloca i64*, align 8
|
||||
store i64* %0, i64** %f, align 8
|
||||
%1 = call i32 @"std::io.println"(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0))
|
||||
ret void
|
||||
|
||||
@@ -59,14 +62,13 @@ define void @foo.MyEnum__hello(i32* %0)
|
||||
|
||||
define void @main()
|
||||
entry:
|
||||
%f = alloca %Foo, align 8
|
||||
%f = alloca i64, align 8
|
||||
%b = alloca i32, align 4
|
||||
%a = alloca i32, align 4
|
||||
%0 = bitcast %Foo* %f to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 8 %0, i8 0, i64 8, i1 false)
|
||||
store i64 0, i64* %f, align 8
|
||||
store i32 0, i32* %b, align 4
|
||||
store i32 0, i32* %a, align 4
|
||||
call void @foo.Foo__hello(%Foo* %f)
|
||||
call void @foo.Foo__hello(i64* %f)
|
||||
call void @foo.Bar__hello(i32* %b)
|
||||
call void @foo.MyEnum__hello(i32* %a)
|
||||
ret void
|
||||
|
||||
Reference in New Issue
Block a user