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:
Christoffer Lerno
2021-08-12 01:08:22 +02:00
committed by Christoffer Lerno
parent 95836e98a2
commit f180a0d44a
63 changed files with 2572 additions and 1124 deletions

View File

@@ -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