mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Changed generic modules to internal templates.
This commit is contained in:
committed by
Christoffer Lerno
parent
b99f8d644b
commit
892c7e8874
@@ -14,7 +14,7 @@ Foo i = { .b = 2.3, .a = 23 };
|
||||
// #expect: test.ll
|
||||
|
||||
@test.f = protected global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8
|
||||
@test.g = protected global %test.Foo { double 2.300000e+00 }, align 8
|
||||
@test.h = protected global %test.Foo { double 2.300000e+00 }, align 8
|
||||
@test.g = protected global %Foo { double 2.300000e+00 }, align 8
|
||||
@test.h = protected global %Foo { double 2.300000e+00 }, align 8
|
||||
@test.i = protected global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8
|
||||
|
||||
|
||||
@@ -25,21 +25,21 @@ func void test()
|
||||
|
||||
// #expect: union_codegen_empty.ll
|
||||
|
||||
%a = alloca %union_codegen_empty.UnionA, align 4
|
||||
%a2 = alloca %union_codegen_empty.UnionA, align 4
|
||||
%b = alloca %union_codegen_empty.UnionB, align 8
|
||||
%b2 = alloca %union_codegen_empty.UnionB, align 8
|
||||
%b3 = alloca %union_codegen_empty.UnionB, align 8
|
||||
%b4 = alloca %union_codegen_empty.UnionB, align 8
|
||||
%0 = bitcast %union_codegen_empty.UnionA* %a to i8*
|
||||
%a = alloca %UnionA, align 4
|
||||
%a2 = alloca %UnionA, align 4
|
||||
%b = alloca %UnionB, align 8
|
||||
%b2 = alloca %UnionB, align 8
|
||||
%b3 = alloca %UnionB, align 8
|
||||
%b4 = alloca %UnionB, align 8
|
||||
%0 = bitcast %UnionA* %a to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 4 %0, i8 0, i64 4, i1 false)
|
||||
%1 = bitcast %union_codegen_empty.UnionA* %a2 to i8*
|
||||
%1 = bitcast %UnionA* %a2 to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 4, i1 false)
|
||||
%2 = bitcast %union_codegen_empty.UnionB* %b to i8*
|
||||
%2 = bitcast %UnionB* %b to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 8 %2, i8 0, i64 8, i1 false)
|
||||
%3 = bitcast %union_codegen_empty.UnionB* %b2 to i8*
|
||||
%3 = bitcast %UnionB* %b2 to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 8 %3, i8 0, i64 8, i1 false)
|
||||
%4 = bitcast %union_codegen_empty.UnionB* %b3 to i8*
|
||||
%4 = bitcast %UnionB* %b3 to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 8 %4, i8 0, i64 8, i1 false)
|
||||
%5 = bitcast %union_codegen_empty.UnionB* %b4 to i8*
|
||||
%5 = bitcast %UnionB* %b4 to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 8 %5, i8 0, i64 8, i1 false)
|
||||
|
||||
@@ -20,12 +20,12 @@ func void test()
|
||||
// #expect: test.ll
|
||||
|
||||
entry:
|
||||
%b = alloca %test.UnionB, align 8
|
||||
%0 = bitcast %test.UnionB* %b to i32*
|
||||
%b = alloca %UnionB, align 8
|
||||
%0 = bitcast %UnionB* %b to i32*
|
||||
%1 = call i32 @bar()
|
||||
store i32 %1, i32* %0, align 4
|
||||
%2 = bitcast %test.UnionB* %b to %test.b*
|
||||
%3 = bitcast %test.b* %2 to i8*
|
||||
%2 = bitcast %UnionB* %b to %b*
|
||||
%3 = bitcast %b* %2 to i8*
|
||||
call void @llvm.memset.p0i8.i64(i8* align 4 %3, i8 0, i64 4, i1 false)
|
||||
ret void
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ func void test(Blend_Map_Entry* foo)
|
||||
// #expect: test.ll
|
||||
|
||||
|
||||
%test.Blend_Map_Entry = type { %test.vals }
|
||||
%test.vals = type { [2 x double], [8 x i8] }
|
||||
%Blend_Map_Entry = type { %vals }
|
||||
%vals = type { [2 x double], [8 x i8] }
|
||||
|
||||
@test.a = protected global { { [5 x float], [4 x i8] } } { { [5 x float], [4 x i8] } { [5 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00], [4 x i8] undef } }, align 8
|
||||
@test.b = protected global %test.Blend_Map_Entry { %test.vals { [2 x double] [double 6.000000e+00, double 7.000000e+00], [8 x i8] undef } }, align 8
|
||||
@test.b = protected global %Blend_Map_Entry { %vals { [2 x double] [double 6.000000e+00, double 7.000000e+00], [8 x i8] undef } }, align 8
|
||||
@test.c = protected global { { { [2 x float], float, [2 x float] }, [4 x i8] } } { { { [2 x float], float, [2 x float] }, [4 x i8] } { { [2 x float], float, [2 x float] } { [2 x float] zeroinitializer, float 1.000000e+00, [2 x float] zeroinitializer }, [4 x i8] undef } }, align 8
|
||||
@test.d = protected global { { [5 x float], [4 x i8] } } { { [5 x float], [4 x i8] } { [5 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00], [4 x i8] undef } }, align 8
|
||||
|
||||
Reference in New Issue
Block a user