diff --git a/src/compiler/ast.c b/src/compiler/ast.c index a22b1a442..4b70393c2 100644 --- a/src/compiler/ast.c +++ b/src/compiler/ast.c @@ -128,7 +128,7 @@ void module_append_name_to_scratch(Module *module) switch (c) { case '_': - scratch_buffer_append("__"); + scratch_buffer_append("_"); break; case ':': scratch_buffer_append_char('_'); @@ -151,7 +151,7 @@ void decl_set_external_name(Decl *decl) } scratch_buffer_clear(); module_append_name_to_scratch(decl->module); - scratch_buffer_append("__"); + scratch_buffer_append("_"); scratch_buffer_append(decl->name ? decl->name : "anon"); decl->extname = scratch_buffer_copy(); } diff --git a/src/compiler/llvm_codegen_expr.c b/src/compiler/llvm_codegen_expr.c index 817e63e0a..8f04fc99e 100644 --- a/src/compiler/llvm_codegen_expr.c +++ b/src/compiler/llvm_codegen_expr.c @@ -5327,7 +5327,7 @@ static inline void llvm_emit_typeid_info(GenContext *c, BEValue *value, Expr *ex if (active_target.feature.safe_mode || expr->typeid_info_expr.kind == TYPEID_INFO_KIND) { kind = llvm_emit_struct_gep_raw(c, ref, c->introspect_type, INTROSPECT_INDEX_KIND, align, &alignment); - kind = llvm_load(c, c->byte_type, ref, alignment, "typeid.kind"); + kind = llvm_load(c, c->byte_type, kind, alignment, "typeid.kind"); } switch (expr->typeid_info_expr.kind) { diff --git a/src/compiler/llvm_codegen_type.c b/src/compiler/llvm_codegen_type.c index b0a148494..51e4fba2b 100644 --- a/src/compiler/llvm_codegen_type.c +++ b/src/compiler/llvm_codegen_type.c @@ -548,6 +548,7 @@ static inline LLVMValueRef llvm_generate_introspection_global(GenContext *c, LLV if (original_global) { LLVMReplaceAllUsesWith(original_global, global_name); + LLVMDeleteGlobal(original_global); } else { diff --git a/src/compiler/module.c b/src/compiler/module.c index 4fdb015ba..d3b2b6b6a 100644 --- a/src/compiler/module.c +++ b/src/compiler/module.c @@ -12,15 +12,24 @@ Decl *module_find_symbol(Module *module, const char *symbol) const char *module_create_object_file_name(Module *module) { scratch_buffer_clear(); - StringSlice slice = slice_from_string(module->name->module); - while (true) + char c; + const char *name = module->name->module; + while ((c = *(name++))) { - StringSlice part = slice_next_token(&slice, ':'); - scratch_buffer_append_len(part.ptr, part.len); - if (!slice.len) break; - slice.ptr++; - slice.len--; - scratch_buffer_append_char('.'); + switch (c) + { + case '$': + if (*name == '$') name++; + if (*name) scratch_buffer_append_char('.'); + break; + case ':': + if (*name == ':') name++; + if (*name) scratch_buffer_append_char('.'); + break; + default: + scratch_buffer_append_char(c); + break; + } } return scratch_buffer_to_string(); } diff --git a/src/compiler/sema_decls.c b/src/compiler/sema_decls.c index d7ebd69e5..58767b6d3 100644 --- a/src/compiler/sema_decls.c +++ b/src/compiler/sema_decls.c @@ -1086,7 +1086,7 @@ static inline bool unit_add_method_like(CompilationUnit *unit, Type *parent_type else { scratch_buffer_append(parent->extname); - scratch_buffer_append("__"); + scratch_buffer_append("_"); scratch_buffer_append(method_like->name); } method_like->extname = scratch_buffer_copy(); @@ -2241,14 +2241,13 @@ static bool sema_analyse_parameterized_define(SemaContext *c, Decl *decl) } scratch_buffer_clear(); scratch_buffer_append_len(module->name->module, module->name->len); - scratch_buffer_append_char('$'); + scratch_buffer_append("$$"); VECEACH(decl->define_decl.generic_params, i) { TypeInfo *type_info = decl->define_decl.generic_params[i]; if (!sema_resolve_type_info(c, type_info)) return decl_poison(decl); - if (i != 0) scratch_buffer_append_char('$'); - const char *type_name = type_info->type->canonical->name; - scratch_buffer_append(type_name); + if (i != 0) scratch_buffer_append_char('.'); + type_mangle_introspect_name_to_buffer(type_info->type->canonical); } TokenType ident_type = TOKEN_IDENT; const char *path_string = scratch_buffer_interned(); diff --git a/src/version.h b/src/version.h index bc9c91f7a..8a933ede8 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define COMPILER_VERSION "0.2.17" \ No newline at end of file +#define COMPILER_VERSION "0.2.18" \ No newline at end of file diff --git a/test/test_suite/abi/aarch64_args.c3t b/test/test_suite/abi/aarch64_args.c3t index 2ac9bd257..c716c6597 100644 --- a/test/test_suite/abi/aarch64_args.c3t +++ b/test/test_suite/abi/aarch64_args.c3t @@ -15,7 +15,7 @@ fn void example() { /* #expect: test.ll -define void @test.example() #0 { +define void @test_example() #0 { entry: %l = alloca %Large, align 8 %indirectarg = alloca %Large, align 8 diff --git a/test/test_suite/abi/aarch64_hfa_args.c3t b/test/test_suite/abi/aarch64_hfa_args.c3t index 7a3522e1b..bead21eb7 100644 --- a/test/test_suite/abi/aarch64_hfa_args.c3t +++ b/test/test_suite/abi/aarch64_hfa_args.c3t @@ -28,5 +28,5 @@ fn MixedHFAv3 test_mixed(MixedHFAv3 a0, MixedHFAv3 a1, MixedHFAv3 a2) { %HFAv3 = type { [4 x <3 x float>] } %MixedHFAv3 = type { [3 x <3 x float>], <16 x i8> } -define %HFAv3 @test.test([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) -define %MixedHFAv3 @test.test_mixed([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) #0 { +define %HFAv3 @test_test([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) +define %MixedHFAv3 @test_test_mixed([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) #0 { diff --git a/test/test_suite/abi/darwin64_avx.c3t b/test/test_suite/abi/darwin64_avx.c3t index 5cd4a74a1..388a75c09 100644 --- a/test/test_suite/abi/darwin64_avx.c3t +++ b/test/test_suite/abi/darwin64_avx.c3t @@ -112,18 +112,18 @@ declare void @f38(<8 x float>) declare void @f37(<8 x float>) declare void @func40(%Two128* byval(%Two128) align 16) -define void @test.func41(%Two128* byval(%Two128) align 16 %0) +define void @test_func41(%Two128* byval(%Two128) align 16 %0) declare void @func42(%Sa* byval(%Sa) align 16) -define void @test.func43(%Sa* byval(%Sa) align 16 %0) +define void @test_func43(%Sa* byval(%Sa) align 16 %0) declare void @f46(double, double, double, double, double, double, double, double, <2 x float>* byval(<2 x float>) align 8, <2 x float>* byval(<2 x float>) align 8) declare void @f47(i32, i32, i32, i32, i32, i32, i32) -declare void @test.test49_helper(double, ...) -define void @test.test49(double %0, double %1) +declare void @test_test49_helper(double, ...) +define void @test_test49(double %0, double %1) entry: - call void (double, ...) @test.test49_helper(double %0, double %1) + call void (double, ...) @test_test49_helper(double %0, double %1) ret void call void (i32, ...) @test52_helper(i32 0, <8 x float> %0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) @@ -135,7 +135,7 @@ declare void @f55(%St512* byval(%St512) align 64) #0 declare void @f56(<16 x float>* byval(<16 x float>) align 64) #0 declare void @f58(%Two256* byval(%Two256) align 32) #0 -define void @test.f59(%Two256* byval(%Two256) align 32 %0) #0 { +define void @test_f59(%Two256* byval(%Two256) align 32 %0) #0 { declare void @f60(%SAtwo256* byval(%SAtwo256) align 32) #0 -define void @test.f61(%SAtwo256* byval(%SAtwo256) align 32 %0) #0 { +define void @test_f61(%SAtwo256* byval(%SAtwo256) align 32 %0) #0 { diff --git a/test/test_suite/abi/darwin64_avx512.c3t b/test/test_suite/abi/darwin64_avx512.c3t index 6e950cef9..b56c2f923 100644 --- a/test/test_suite/abi/darwin64_avx512.c3t +++ b/test/test_suite/abi/darwin64_avx512.c3t @@ -62,14 +62,14 @@ declare void @f55(<16 x float>) #0 declare void @f56(<16 x float>) #0 declare void @f58(%Two256* byval(%Two256) align 32) #0 -define void @test.f59(%Two256* byval(%Two256) align 32 %0) #0 { +define void @test_f59(%Two256* byval(%Two256) align 32 %0) #0 { declare void @f60(%SAtwo256* byval(%SAtwo256) align 32) #0 -define void @test.f61(%SAtwo256* byval(%SAtwo256) align 32 %0) #0 { +define void @test_f61(%SAtwo256* byval(%SAtwo256) align 32 %0) #0 { -define void @test.f62() #0 { - call void (i32, ...) @test.f62_helper(i32 0, <16 x float> %0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) -define void @test.f64() #0 { - call void (<16 x float>, ...) @test.f64_helper(<16 x float> %0, <16 x float> %1, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) - call void (<16 x float>, ...) @test.f64_helper(<16 x float> %7, <16 x float> %8, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, %Complex* byval(%Complex) align 8 %indirectarg) +define void @test_f62() #0 { + call void (i32, ...) @test_f62_helper(i32 0, <16 x float> %0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) +define void @test_f64() #0 { + call void (<16 x float>, ...) @test_f64_helper(<16 x float> %0, <16 x float> %1, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) + call void (<16 x float>, ...) @test_f64_helper(<16 x float> %7, <16 x float> %8, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, %Complex* byval(%Complex) align 8 %indirectarg) diff --git a/test/test_suite/abi/darwin64_sse.c3t b/test/test_suite/abi/darwin64_sse.c3t index f54e0dc74..a425eb231 100644 --- a/test/test_suite/abi/darwin64_sse.c3t +++ b/test/test_suite/abi/darwin64_sse.c3t @@ -50,7 +50,7 @@ declare void @f38(%St256* byval(%St256) align 32) declare void @f37(<8 x float>* byval(<8 x float>) align 32) declare void @func40(%Two128* byval(%Two128) align 16) -define void @test.func41(%Two128* byval(%Two128) align 16 %0) +define void @test_func41(%Two128* byval(%Two128) align 16 %0) declare void @func42(%Sa* byval(%Sa) align 16) -define void @test.func43(%Sa* byval(%Sa) align 16 %0) +define void @test_func43(%Sa* byval(%Sa) align 16 %0) diff --git a/test/test_suite/abi/darwinx64_1.c3t b/test/test_suite/abi/darwinx64_1.c3t index 829694cbe..90ceda530 100644 --- a/test/test_suite/abi/darwinx64_1.c3t +++ b/test/test_suite/abi/darwinx64_1.c3t @@ -37,12 +37,12 @@ fn void f8_2(Struct8 a0) {} /* #expect: test.ll -define zeroext i8 @test.f0() -define signext i16 @test.f1() -define i32 @test.f2() -define float @test.f3() -define double @test.f4() -define void @test.f6(i8 zeroext %0, i16 signext %1, i32 %2, i64 %3, i8* %4) -define void @test.f7(i32 %0) -define i64 @test.f8_1() -define void @test.f8_2(i64 %0) #0 { +define zeroext i8 @test_f0() +define signext i16 @test_f1() +define i32 @test_f2() +define float @test_f3() +define double @test_f4() +define void @test_f6(i8 zeroext %0, i16 signext %1, i32 %2, i64 %3, i8* %4) +define void @test_f7(i32 %0) +define i64 @test_f8_1() +define void @test_f8_2(i64 %0) #0 { diff --git a/test/test_suite/abi/darwinx64_2.c3t b/test/test_suite/abi/darwinx64_2.c3t index d05f9f9ab..144a8b9b4 100644 --- a/test/test_suite/abi/darwinx64_2.c3t +++ b/test/test_suite/abi/darwinx64_2.c3t @@ -147,40 +147,40 @@ fn V2i32 f36(V2i32 arg) { return arg; } /* #expect: test.ll -define i32 @test.f12_0() -define void @test.f12_1(i32 %0) -define void @test.f13(%St13_0* noalias sret(%St13_0) align 8 %0, i32 %1, i32 %2, i32 %3, i32 %4, %St13_1* byval(%St13_1) align 8 %5, i32 %6) #0 { -define void @test.f14(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 signext %6) #0 { -define void @test.f15(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8* %6) +define i32 @test_f12_0() +define void @test_f12_1(i32 %0) +define void @test_f13(%St13_0* noalias sret(%St13_0) align 8 %0, i32 %1, i32 %2, i32 %3, i32 %4, %St13_1* byval(%St13_1) align 8 %5, i32 %6) #0 { +define void @test_f14(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 signext %6) #0 { +define void @test_f15(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8* %6) -define void @test.f16(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) +define void @test_f16(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) -define void @test.fl18(i32 %0, i32 %1) -define void @test.f20(%St20* byval(%St20) align 32 %0) -define i8* @test.f21(i64 %0, i8* %1) +define void @test_fl18(i32 %0, i32 %1) +define void @test_f20(%St20* byval(%St20) align 32 %0) +define i8* @test_f21(i64 %0, i8* %1) -define void @test.f22(i64 %0, i64 %1, i64 %2, i64 %3) +define void @test_f22(i64 %0, i64 %1, i64 %2, i64 %3) entry: %x = alloca %St22s, align 16 %y = alloca %St22s, align 16 -define void @test.f23(i32 %0, i64 %1, i32 %2) -define { i64, i32 } @test.f24(%St23S* %0, %St24s* %1) +define void @test_f23(i32 %0, i64 %1, i32 %2) +define { i64, i32 } @test_f24(%St23S* %0, %St24s* %1) -define <4 x float> @test.f25(<4 x float> %0) #0 { +define <4 x float> @test_f25(<4 x float> %0) #0 { entry: %fadd = fadd <4 x float> %0, %0 ret <4 x float> %fadd } -define { i32*, float* } @test.f26(%Foo26* %0) -define <4 x float> @test.f27(<4 x float> %0) -define <8 x float> @test.f27a(<8 x float> %0) -define <8 x float> @test.f27b(<8 x float> %0) -define void @test.f28(double %0, i32 %1) -define void @test.f29a(double %0, i32 %1) -define void @test.f30(i64 %0, i24 %1) -define float @test.f31(<2 x float> %0, float %1) -define double @test.f34(double %0) -define double @test.f35(double %0) -define double @test.f36(double %0) +define { i32*, float* } @test_f26(%Foo26* %0) +define <4 x float> @test_f27(<4 x float> %0) +define <8 x float> @test_f27a(<8 x float> %0) +define <8 x float> @test_f27b(<8 x float> %0) +define void @test_f28(double %0, i32 %1) +define void @test_f29a(double %0, i32 %1) +define void @test_f30(i64 %0, i24 %1) +define float @test_f31(<2 x float> %0, float %1) +define double @test_f34(double %0) +define double @test_f35(double %0) +define double @test_f36(double %0) diff --git a/test/test_suite/abi/literal_load_aarch64.c3t b/test/test_suite/abi/literal_load_aarch64.c3t index a09c3bb93..ea6de7b9d 100644 --- a/test/test_suite/abi/literal_load_aarch64.c3t +++ b/test/test_suite/abi/literal_load_aarch64.c3t @@ -20,7 +20,7 @@ fn Test creator() declare void @blorg(i64) #0 -define i32 @literal_load.creator() #0 { +define i32 @literal_load_creator() #0 { entry: %literal = alloca %Test, align 4 %literal1 = alloca %Test, align 4 diff --git a/test/test_suite/abi/pass_large_aarch.c3t b/test/test_suite/abi/pass_large_aarch.c3t index 849b4686a..3e156d241 100644 --- a/test/test_suite/abi/pass_large_aarch.c3t +++ b/test/test_suite/abi/pass_large_aarch.c3t @@ -19,7 +19,7 @@ fn void example() /* #expect: pass_large.ll -define void @pass_large.example() +define void @pass_large_example() entry: %l = alloca %Large, align 8 %indirectarg = alloca %Large, align 8 diff --git a/test/test_suite/abi/regcall_expand.c3t b/test/test_suite/abi/regcall_expand.c3t index bc6f01fb3..b712caf02 100644 --- a/test/test_suite/abi/regcall_expand.c3t +++ b/test/test_suite/abi/regcall_expand.c3t @@ -21,13 +21,11 @@ fn int main() %Foo = type { [2 x float] } -$.typeid.test.Foo = comdat any +$"ct$test_Foo" = comdat any -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 1 }, comdat, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 1, [0 x i64] zeroinitializer }, comdat, align 8 -declare void @printf(i8*, ...) #0 - -define x86_regcallcc void @test.test(float %0, float %1) #0 { +define x86_regcallcc void @test_test(float %0, float %1) #0 { entry: %x = alloca %Foo, align 4 %2 = getelementptr inbounds %Foo, %Foo* %x, i32 0, i32 0 @@ -52,6 +50,6 @@ entry: %loadexpanded = load float, float* %4, align 4 %5 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1 %loadexpanded1 = load float, float* %5, align 4 - call x86_regcallcc void @test.test(float %loadexpanded, float %loadexpanded1) + call x86_regcallcc void @test_test(float %loadexpanded, float %loadexpanded1) ret i32 0 -} +} \ No newline at end of file diff --git a/test/test_suite/abi/riscv64-lp64-abi.c3t b/test/test_suite/abi/riscv64-lp64-abi.c3t index 39e3ccb27..abb96410c 100644 --- a/test/test_suite/abi/riscv64-lp64-abi.c3t +++ b/test/test_suite/abi/riscv64-lp64-abi.c3t @@ -19,7 +19,7 @@ fn Large f_scalar_stack_2(double a, int128 b, float128 c, V32i8 d, /* #expect: test.ll -define signext i32 @test.f_scalar_stack_1(i32 signext %0, i128 %1, float %2, fp128 %3, <32 x i8>* align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { +define signext i32 @test_f_scalar_stack_1(i32 signext %0, i128 %1, float %2, fp128 %3, <32 x i8>* align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { entry: %e = alloca <32 x i8>, align 32 %8 = bitcast <32 x i8>* %e to i8* @@ -30,7 +30,7 @@ entry: %add = add i32 %uisiext, %uisiext1 ret i32 %add } -define void @test.f_scalar_stack_2(%Large* noalias sret(%Large) align 8 %0, double %1, i128 %2, fp128 %3, <32 x i8>* align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { +define void @test_f_scalar_stack_2(%Large* noalias sret(%Large) align 8 %0, double %1, i128 %2, fp128 %3, <32 x i8>* align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { entry: %d = alloca <32 x i8>, align 32 %literal = alloca %Large, align 8 diff --git a/test/test_suite/abi/small_struct_x64.c3t b/test/test_suite/abi/small_struct_x64.c3t index e1a047496..7c8573b68 100644 --- a/test/test_suite/abi/small_struct_x64.c3t +++ b/test/test_suite/abi/small_struct_x64.c3t @@ -20,7 +20,7 @@ fn Foo getFoo(Foo f) /* #expect: test.ll -define i32 @test.testing() #0 { +define i32 @test_testing() #0 { entry: %y = alloca %Foo, align 1 %literal = alloca %Foo, align 1 @@ -36,7 +36,7 @@ entry: %4 = bitcast %Foo* %literal to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 1 %4, i32 3, i1 false) %5 = load i24, i24* %tempcoerce, align 4 - %6 = call i24 @test.getFoo(i24 %5) + %6 = call i24 @test_getFoo(i24 %5) %7 = bitcast %Foo* %result to i24* store i24 %6, i24* %7, align 1 %8 = bitcast %Foo* %y to i8* @@ -52,7 +52,7 @@ entry: ret i32 %add } ; Function Attrs: nounwind -define i24 @test.getFoo(i24 %0) #0 { +define i24 @test_getFoo(i24 %0) #0 { entry: %f = alloca %Foo, align 1 %literal = alloca %Foo, align 1 diff --git a/test/test_suite/abi/sysv_direct_coerce.c3t b/test/test_suite/abi/sysv_direct_coerce.c3t index 9f1ede8b8..a81bf313a 100644 --- a/test/test_suite/abi/sysv_direct_coerce.c3t +++ b/test/test_suite/abi/sysv_direct_coerce.c3t @@ -16,7 +16,7 @@ fn void test(Rectangle r) /* #expect: foo.ll -define void @foo.test(<2 x float> %0, <2 x float> %1) #0 { +define void @foo_test(<2 x float> %0, <2 x float> %1) #0 { entry: %r = alloca %Rectangle, align 4 %literal = alloca %Rectangle, align 4 @@ -42,6 +42,6 @@ entry: %lo = load <2 x float>, <2 x float>* %11, align 8 %12 = getelementptr inbounds { <2 x float>, <2 x float> }, { <2 x float>, <2 x float> }* %8, i32 0, i32 1 %hi = load <2 x float>, <2 x float>* %12, align 8 - call void @foo.test(<2 x float> %lo, <2 x float> %hi) + call void @foo_test(<2 x float> %lo, <2 x float> %hi) ret void } \ No newline at end of file diff --git a/test/test_suite/abi/union_x64.c3t b/test/test_suite/abi/union_x64.c3t index 58288d2b0..9490947df 100644 --- a/test/test_suite/abi/union_x64.c3t +++ b/test/test_suite/abi/union_x64.c3t @@ -14,13 +14,13 @@ fn void hello(Foo f) hello2(f); } -// #expect: unionx64.ll +/* #expect: unionx64.ll %Foo = type { i64, [8 x i8] } declare void @hello2(i64, i64) #0 -define void @unionx64.hello(i64 %0, i64 %1) #0 { +define void @unionx64_hello(i64 %0, i64 %1) #0 { entry: %f = alloca %Foo, align 8 %pair = bitcast %Foo* %f to { i64, i64 }* diff --git a/test/test_suite/abi/x64alignarray.c3t b/test/test_suite/abi/x64alignarray.c3t index b86fae87d..55b2cefb4 100644 --- a/test/test_suite/abi/x64alignarray.c3t +++ b/test/test_suite/abi/x64alignarray.c3t @@ -11,7 +11,7 @@ fn void test1_g() /* #expect: test.ll -define void @test.test1_g() #0 { +define void @test_test1_g() #0 { entry: %x = alloca [4 x float], align 16 %0 = getelementptr inbounds [4 x float], [4 x float]* %x, i64 0, i64 0 diff --git a/test/test_suite/arrays/array_casts.c3t b/test/test_suite/arrays/array_casts.c3t index 3cb985491..7c2419f00 100644 --- a/test/test_suite/arrays/array_casts.c3t +++ b/test/test_suite/arrays/array_casts.c3t @@ -13,7 +13,7 @@ fn void test() %"int[]" = type { i32*, i64 } -define void @array_casts.test() #0 { +define void @array_casts_test() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca i32*, align 8 diff --git a/test/test_suite/arrays/array_literal.c3t b/test/test_suite/arrays/array_literal.c3t index 2f4f51b3d..1af6a5c2f 100644 --- a/test/test_suite/arrays/array_literal.c3t +++ b/test/test_suite/arrays/array_literal.c3t @@ -16,7 +16,7 @@ fn double test(uint x) @.__const = private unnamed_addr constant [30 x double] [double 0.000000e+00, double 1.270600e+01, double 4.303000e+00, double 3.182000e+00, double 2.776000e+00, double 2.571000e+00, double 2.447000e+00, double 2.365000e+00, double 2.306000e+00, double 2.262000e+00, double 2.228000e+00, double 2.201000e+00, double 2.179000e+00, double 2.160000e+00, double 2.145000e+00, double 2.131000e+00, double 2.120000e+00, double 2.110000e+00, double 2.101000e+00, double 2.093000e+00, double 2.086000e+00, double 2.080000e+00, double 2.074000e+00, double 2.069000e+00, double 2.064000e+00, double 2.060000e+00, double 2.056000e+00, double 2.052000e+00, double 2.048000e+00, double 2.045000e+00], align 16 -define double @array_literal.test(i32 %0) #0 { +define double @array_literal_test(i32 %0) #0 { entry: %student_t = alloca [30 x double], align 16 %1 = bitcast [30 x double]* %student_t to i8* diff --git a/test/test_suite/arrays/array_struct.c3t b/test/test_suite/arrays/array_struct.c3t index 2d4ebb1c0..95a64f13f 100644 --- a/test/test_suite/arrays/array_struct.c3t +++ b/test/test_suite/arrays/array_struct.c3t @@ -10,4 +10,4 @@ private Foo[10] array; // #expect: test.ll -@test.array = protected unnamed_addr global [10 x %Foo] zeroinitializer, align 16 \ No newline at end of file +@test_array = protected unnamed_addr global [10 x %Foo] zeroinitializer, align 16 \ No newline at end of file diff --git a/test/test_suite/arrays/complex_array_const.c3t b/test/test_suite/arrays/complex_array_const.c3t index 67a3281c0..85b28771f 100644 --- a/test/test_suite/arrays/complex_array_const.c3t +++ b/test/test_suite/arrays/complex_array_const.c3t @@ -18,4 +18,4 @@ private Connection[3] link @.str = private unnamed_addr constant [6 x i8] c"link1\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"link2\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"link3\00", align 1 -@test.link = protected unnamed_addr global [3 x %Connection] [%Connection { i64 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i64 10 }, %Connection { i64 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i64 20 }, %Connection { i64 3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i64 30 }], align 16 +@test_link = protected unnamed_addr global [3 x %Connection] [%Connection { i64 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i64 10 }, %Connection { i64 2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i64 20 }, %Connection { i64 3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i64 30 }], align 16 diff --git a/test/test_suite/arrays/index_from_back.c3t b/test/test_suite/arrays/index_from_back.c3t index 716dc9f3a..0aec3324b 100644 --- a/test/test_suite/arrays/index_from_back.c3t +++ b/test/test_suite/arrays/index_from_back.c3t @@ -15,7 +15,7 @@ fn void test(int[10] x, int[<10>] y) /* #expect: test.ll -define void @test.test([10 x i32]* byval([10 x i32]) align 8 %0, <10 x i32>* byval(<10 x i32>) align 64 %1) #0 { +define void @test_test([10 x i32]* byval([10 x i32]) align 8 %0, <10 x i32>* byval(<10 x i32>) align 64 %1) #0 { entry: %x = alloca [10 x i32], align 4 %y = alloca <10 x i32>, align 64 diff --git a/test/test_suite/arrays/index_into_global.c3t b/test/test_suite/arrays/index_into_global.c3t index e5ff578bf..c8c0e2be6 100644 --- a/test/test_suite/arrays/index_into_global.c3t +++ b/test/test_suite/arrays/index_into_global.c3t @@ -22,12 +22,12 @@ fn void test_bar(int idx) /* #expect: foo.ll -define void @foo.test_bar(i32 %0) #0 { +define void @foo_test_bar(i32 %0) #0 { entry: %sisiext = sext i32 %0 to i64 - %1 = getelementptr inbounds [6 x %Bar], [6 x %Bar]* @foo.bar, i64 0, i64 %sisiext + %1 = getelementptr inbounds [6 x %Bar], [6 x %Bar]* @foo_bar, i64 0, i64 %sisiext %2 = getelementptr inbounds %Bar, %Bar* %1, i32 0, i32 0 store i32 0, i32* %2, align 4 - store i32 %0, i32* getelementptr inbounds ([6 x %Bar], [6 x %Bar]* @foo.bar, i64 0, i64 0, i32 0), align 4 + store i32 %0, i32* getelementptr inbounds ([6 x %Bar], [6 x %Bar]* @foo_bar, i64 0, i64 0, i32 0), align 4 ret void } diff --git a/test/test_suite/assert/assert_variants.c3t b/test/test_suite/assert/assert_variants.c3t index 51efa6472..10e42aae6 100644 --- a/test/test_suite/assert/assert_variants.c3t +++ b/test/test_suite/assert/assert_variants.c3t @@ -24,11 +24,11 @@ fn void test() %x = alloca i32, align 4 %y = alloca i32, align 4 %z = alloca i32, align 4 - %0 = call i32 @assert_variants.foo() + %0 = call i32 @assert_variants_foo() store i32 %0, i32* %x, align 4 - %1 = call i32 @assert_variants.foo() + %1 = call i32 @assert_variants_foo() store i32 %1, i32* %y, align 4 - %2 = call i32 @assert_variants.foo() + %2 = call i32 @assert_variants_foo() store i32 %2, i32* %z, align 4 %3 = load i32, i32* %x, align 4 %gt = icmp sgt i32 %3, 0 diff --git a/test/test_suite/assert/unreachable.c3t b/test/test_suite/assert/unreachable.c3t index 6e6b652b9..02ccb8552 100644 --- a/test/test_suite/assert/unreachable.c3t +++ b/test/test_suite/assert/unreachable.c3t @@ -14,11 +14,10 @@ fn void test() /* #expect: unreachable.ll - -define void @unreachable.test() #0 { +define void @unreachable_test() #0 { entry: %x = alloca i32, align 4 - %0 = call i32 @unreachable.foo() + %0 = call i32 @unreachable_foo() store i32 %0, i32* %x, align 4 %1 = load i32, i32* %x, align 4 %gt = icmp sgt i32 %1, 0 @@ -28,7 +27,7 @@ if.then: ; preds = %entry ret void if.exit: ; preds = %entry - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i32 10) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i32 10) unreachable after.unreachable: ; No predecessors! diff --git a/test/test_suite/attributes/user_defined_attributes.c3t b/test/test_suite/attributes/user_defined_attributes.c3t index f7643cfe8..b55335e62 100644 --- a/test/test_suite/attributes/user_defined_attributes.c3t +++ b/test/test_suite/attributes/user_defined_attributes.c3t @@ -28,18 +28,18 @@ fn void main() @TestZero %Foo = type { i32, [1020 x i8], i32, [1020 x i8] } -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@test.f = local_unnamed_addr global %Foo zeroinitializer, align 1024 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 2048, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@test_f = local_unnamed_addr global %Foo zeroinitializer, align 1024 -define void @test.testme() #0 { +define void @test_testme() #0 { entry: %x = alloca i32, align 4 store i32 0, i32* %x, align 4 ret void } -define void @test.main() #1 { +define void @test_main() #1 { entry: - call void @test.testme() + call void @test_testme() ret void } \ No newline at end of file diff --git a/test/test_suite/bitstruct/array_with_boolean.c3t b/test/test_suite/bitstruct/array_with_boolean.c3t index 93f986118..f61746601 100644 --- a/test/test_suite/bitstruct/array_with_boolean.c3t +++ b/test/test_suite/bitstruct/array_with_boolean.c3t @@ -23,7 +23,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %xx = alloca [3 x i8], align 1 %xy = alloca [3 x i8], align 1 diff --git a/test/test_suite/bitstruct/bitfield_access.c3t b/test/test_suite/bitstruct/bitfield_access.c3t index d0fa74224..cbdab9caf 100644 --- a/test/test_suite/bitstruct/bitfield_access.c3t +++ b/test/test_suite/bitstruct/bitfield_access.c3t @@ -93,7 +93,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %b = alloca i8, align 1 %c1 = alloca i16, align 2 diff --git a/test/test_suite/bitstruct/bitstruct_access_signed.c3t b/test/test_suite/bitstruct/bitstruct_access_signed.c3t index ff3ed4f2c..ee37a01c3 100644 --- a/test/test_suite/bitstruct/bitstruct_access_signed.c3t +++ b/test/test_suite/bitstruct/bitstruct_access_signed.c3t @@ -30,7 +30,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %xx = alloca [3 x i8], align 1 %xxu = alloca [3 x i8], align 1 diff --git a/test/test_suite/bitstruct/bitstruct_arrays.c3t b/test/test_suite/bitstruct/bitstruct_arrays.c3t index 853d08392..822be4033 100644 --- a/test/test_suite/bitstruct/bitstruct_arrays.c3t +++ b/test/test_suite/bitstruct/bitstruct_arrays.c3t @@ -122,16 +122,16 @@ fn void test3() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: - call void @foo.test1() - call void @foo.test2() - call void @foo.test3() + call void @foo_test1() + call void @foo_test2() + call void @foo_test3() ret void } ; Function Attrs: nounwind -define void @foo.test1() #0 { +define void @foo_test1() #0 { entry: %xx = alloca i64, align 8 store i64 531994, i64* %xx, align 8 @@ -342,7 +342,7 @@ entry: } ; Function Attrs: nounwind -define void @foo.test2() #0 { +define void @foo_test2() #0 { entry: %xx = alloca [3 x i8], align 1 store [3 x i8] c"\1A\1E\00", [3 x i8]* %xx, align 1 @@ -739,7 +739,7 @@ entry: } ; Function Attrs: nounwind -define void @foo.test3() #0 { +define void @foo_test3() #0 { entry: %xx = alloca [3 x i8], align 1 store [3 x i8] c"4<\00", [3 x i8]* %xx, align 1 diff --git a/test/test_suite/bitstruct/bitstruct_arrays_be.c3t b/test/test_suite/bitstruct/bitstruct_arrays_be.c3t index 4c9ec99a5..017d87088 100644 --- a/test/test_suite/bitstruct/bitstruct_arrays_be.c3t +++ b/test/test_suite/bitstruct/bitstruct_arrays_be.c3t @@ -37,7 +37,7 @@ fn void test3() /* #expect: foo.ll -define void @foo.test3() #0 { +define void @foo_test3() #0 { entry: %xx = alloca [4 x i8], align 1 %xy = alloca [4 x i8], align 1 diff --git a/test/test_suite/bitstruct/bitstruct_to_int.c3t b/test/test_suite/bitstruct/bitstruct_to_int.c3t index 4c22567eb..4391cb79b 100644 --- a/test/test_suite/bitstruct/bitstruct_to_int.c3t +++ b/test/test_suite/bitstruct/bitstruct_to_int.c3t @@ -48,7 +48,7 @@ fn void main() /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %b = alloca i32, align 4 %x = alloca i32, align 4 @@ -76,7 +76,7 @@ entry: } ; Function Attrs: nounwind -define void @foo.test2() #0 { +define void @foo_test2() #0 { entry: %b = alloca [4 x i8], align 1 %x = alloca i32, align 4 diff --git a/test/test_suite/bitstruct/embedded_bitstruct.c3t b/test/test_suite/bitstruct/embedded_bitstruct.c3t index 3f89ee287..59ba5f866 100644 --- a/test/test_suite/bitstruct/embedded_bitstruct.c3t +++ b/test/test_suite/bitstruct/embedded_bitstruct.c3t @@ -46,7 +46,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %b = alloca %Bar, align 4 %f = alloca %Foo, align 4 @@ -62,7 +62,7 @@ entry: %8 = ashr i32 %7, 23 call void (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i32 %4, i32 %8) %9 = bitcast %Foo* %f to i8* - call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %9, i8* align 4 bitcast (%Foo* @.__const.5 to i8*), i32 16, i1 false) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %9, i8* align 4 bitcast (%Foo* @.__const.10 to i8*), i32 16, i1 false) %10 = getelementptr inbounds %Foo, %Foo* %f, i32 0, i32 0 %11 = getelementptr inbounds %anon.1, %anon.1* %10, i32 0, i32 0 %12 = getelementptr inbounds %anon.2, %anon.2* %11, i32 0, i32 0 @@ -76,6 +76,6 @@ entry: %20 = load i32, i32* %19, align 4 %21 = getelementptr inbounds %Foo, %Foo* %f, i32 0, i32 1 %22 = load i32, i32* %21, align 4 - call void (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i32 0, i32 0), i32 %13, i32 %17, i32 %20, i32 %22) + call void (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i32 0, i32 0), i32 %13, i32 %17, i32 %20, i32 %22) ret void } diff --git a/test/test_suite/builtins/simple_builtins.c3t b/test/test_suite/builtins/simple_builtins.c3t index 7f636b97f..b22cbbaeb 100644 --- a/test/test_suite/builtins/simple_builtins.c3t +++ b/test/test_suite/builtins/simple_builtins.c3t @@ -18,7 +18,7 @@ fn int foo(double b) // #expect: foo.ll -define i32 @foo.foo(double %0) #0 { +define i32 @foo_foo(double %0) #0 { entry: %d = alloca double, align 8 %e = alloca double, align 8 diff --git a/test/test_suite/cast/top_down_casts.c3t b/test/test_suite/cast/top_down_casts.c3t index 77744b176..e10553f7f 100644 --- a/test/test_suite/cast/top_down_casts.c3t +++ b/test/test_suite/cast/top_down_casts.c3t @@ -17,7 +17,7 @@ fn void test() // #expect: top_down_casts.ll -define void @top_down_casts.test() #0 { +define void @top_down_casts_test() #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 diff --git a/test/test_suite/clang/2002-01_02.c3t b/test/test_suite/clang/2002-01_02.c3t index 91472c32d..b0b051c9e 100644 --- a/test/test_suite/clang/2002-01_02.c3t +++ b/test/test_suite/clang/2002-01_02.c3t @@ -141,31 +141,36 @@ void *[*] data = { &afoo, &abar, &axx }; %Test = type { i16, i16, i32, i32 } %STest2 = type { i32, [4 x i16], double } -@test.array = local_unnamed_addr global [10 x %Foo] zeroinitializer, align 16 -@test.afoo = global double 1.700000e+01, align 8 -@test.abar = global double 1.200000e+01, align 8 -@test.axx = global float 1.200000e+01, align 4 +@test_array = local_unnamed_addr global [10 x %Foo] zeroinitializer, align 16 +@test_afoo = global double 1.700000e+01, align 8 +@test_abar = global double 1.200000e+01, align 8 +@test_axx = global float 1.200000e+01, align 4 @.str = private unnamed_addr constant [5 x i8] c"EXIT\00", align 1 -@test.procnames = local_unnamed_addr global [1 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)], align 8 -@test.data = local_unnamed_addr global [3 x i8*] [i8* bitcast (double* @test.afoo to i8*), i8* bitcast (double* @test.abar to i8*), i8* bitcast (float* @test.axx to i8*)], align 16 +@test_procnames = local_unnamed_addr global [1 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)], align 8 +@test_data = local_unnamed_addr global [3 x i8*] [i8* bitcast (double* @test_afoo to i8*), i8* bitcast (double* @test_abar to i8*), i8* bitcast (float* @test_axx to i8*)], align 16 @.str.6 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 -define void @test.foo() #0 { +; Function Attrs: nounwind +define void @test_foo() #0 { entry: ret void } -declare i8* @test.dlclose(i8*) #0 +; Function Attrs: nounwind +declare i8* @test_dlclose(i8*) #0 -define void @test.ap_os_dso_unload(i8* %0) #0 { +; Function Attrs: nounwind +define void @test_ap_os_dso_unload(i8* %0) #0 { entry: - %1 = call i8* @test.dlclose(i8* %0) + %1 = call i8* @test_dlclose(i8* %0) ret void } +; Function Attrs: nounwind declare void @foo2(i32, double, float) #0 -define void @test.bar(i32 %0) #0 { +; Function Attrs: nounwind +define void @test_bar(i32 %0) #0 { entry: %intbool = icmp ne i32 %0, 0 %ternary = select i1 %intbool, double 1.000000e+00, double 1.250000e+01 @@ -173,9 +178,11 @@ entry: ret void } +; Function Attrs: nounwind declare i32 @tolower(i32) #0 -define i8* @test.rangematch(i8* %0, i32 %1, i32 %2) #0 { +; Function Attrs: nounwind +define i8* @test_rangematch(i8* %0, i32 %1, i32 %2) #0 { entry: %le = icmp sle i32 %2, %1 %3 = call i32 @tolower(i32 %2) @@ -193,9 +200,11 @@ if.exit: ; preds = %entry ret i8* %0 } +; Function Attrs: nounwind declare i32 @foo3(i16) #0 -define void @test.teste2() #0 { +; Function Attrs: nounwind +define void @test_teste2() #0 { entry: %xqic = alloca %Foostruct, align 2 %0 = bitcast %Foostruct* %xqic to i16* @@ -206,7 +215,8 @@ entry: ret void } -define i32 @test.do_merge(%Edge_rec* %0, %Edge_rec* %1) #0 { +; Function Attrs: nounwind +define i32 @test_do_merge(%Edge_rec* %0, %Edge_rec* %1) #0 { entry: %lvalid = alloca i32, align 4 %basel = alloca %Edge_rec*, align 8 @@ -235,22 +245,26 @@ loop.exit: ; No predecessors! ret i32 1 } -define i32 @test.test(i32 %0) #0 { +; Function Attrs: nounwind +define i32 @test_test(i32 %0) #0 { entry: ret i32 %0 } -declare void @test.abc(i32*) #0 +; Function Attrs: nounwind +declare void @test_abc(i32*) #0 -define i32 @test.def(i32 %0, i32 %1) #0 { +; Function Attrs: nounwind +define i32 @test_def(i32 %0, i32 %1) #0 { entry: %z = alloca i32, align 4 store i32 %1, i32* %z, align 4 - call void @test.abc(i32* %z) + call void @test_abc(i32* %z) ret i32 %0 } -define i32 @test.testing(%Test* %0) #0 { +; Function Attrs: nounwind +define i32 @test_testing(%Test* %0) #0 { entry: %1 = getelementptr inbounds %Test, %Test* %0, i32 0, i32 1 %2 = load i16, i16* %1, align 2 @@ -261,7 +275,8 @@ entry: ret i32 %add } -define i32 @test.test2(i32 %0, i64 %1, i32 %2, i32 %3) #0 { +; Function Attrs: nounwind +define i32 @test_test2(i32 %0, i64 %1, i32 %2, i32 %3) #0 { entry: %4 = alloca { i64, i32 }, align 8 %a = bitcast { i64, i32 }* %4 to %Test* @@ -280,7 +295,8 @@ entry: ret i32 %add2 } -define i32 @test.test3(i64 %0, i32 %1, i64 %2, i32 %3) #0 { +; Function Attrs: nounwind +define i32 @test_test3(i64 %0, i32 %1, i64 %2, i32 %3) #0 { entry: %4 = alloca { i64, i32 }, align 8 %5 = alloca { i64, i32 }, align 8 @@ -309,7 +325,8 @@ entry: ret i32 %add2 } -define { i64, i32 } @test.test4(i64 %0, i32 %1) #0 { +; Function Attrs: nounwind +define { i64, i32 } @test_test4(i64 %0, i32 %1) #0 { entry: %2 = alloca { i64, i32 }, align 8 %tempcoerce = alloca { i64, i32 }, align 8 @@ -325,7 +342,8 @@ entry: ret { i64, i32 } %7 } -define i32 @test.test6() #0 { +; Function Attrs: nounwind +define i32 @test_test6() #0 { entry: %b = alloca [200 x i32], align 16 %0 = bitcast [200 x i32]* %b to i8* @@ -335,7 +353,8 @@ entry: ret i32 %2 } -define void @test.test7(%STest2* noalias sret(%STest2) align 8 %0, %STest2* byval(%STest2) align 8 %1) #0 { +; Function Attrs: nounwind +define void @test_test7(%STest2* noalias sret(%STest2) align 8 %0, %STest2* byval(%STest2) align 8 %1) #0 { entry: %x = alloca %STest2, align 8 %2 = bitcast %STest2* %x to i8* @@ -347,9 +366,11 @@ entry: ret void } +; Function Attrs: nounwind declare i32 @printf(i8*, ...) #0 -define i32 @test.main2() #0 { +; Function Attrs: nounwind +define i32 @test_main2() #0 { entry: %v = alloca i64, align 8 store i64 123455678902, i64* %v, align 8 diff --git a/test/test_suite/clang/2002-03.c3t b/test/test_suite/clang/2002-03.c3t index 45b742cdd..9cc3fba78 100644 --- a/test/test_suite/clang/2002-03.c3t +++ b/test/test_suite/clang/2002-03.c3t @@ -53,25 +53,23 @@ fn char* foo() { /* #expect: test.ll -@test.a = local_unnamed_addr global { i32, i32, [8 x i32] } { i32 0, i32 2, [8 x i32] zeroinitializer }, align 16 -@test.str = local_unnamed_addr global [10 x i8] c"x\00\00\00\00\00\00\00\00\00", align 1 -@test.arr = local_unnamed_addr global { i8*, i8*, [3 x i8*] } zeroinitializer, align 16 -@test.f = local_unnamed_addr global { float, float, [10 x float] } { float 0x3FF3AE1480000000, float 0x40415999A0000000, [10 x float] zeroinitializer }, align 16 -@test.array = local_unnamed_addr global { %Test, %Test, [8 x %Test] } { %Test { i32 2, double 1.200000e+01 }, %Test { i32 3, double 2.400000e+01 }, [8 x %Test] zeroinitializer }, align 16 -@test.b = local_unnamed_addr global { [4 x i32], { i32, i32, i32, i32 }, { i32, i32, [2 x i32] }, [4 x i32] } { [4 x i32] [i32 1, i32 2, i32 3, i32 4], { i32, i32, i32, i32 } { i32 5, i32 6, i32 7, i32 0 }, { i32, i32, [2 x i32] } { i32 8, i32 9, [2 x i32] zeroinitializer }, [4 x i32] zeroinitializer }, align 16 -@test.link = local_unnamed_addr global [3 x %Connection] [%Connection { i64 1, [10 x i8] c"link1\00\00\00\00\00", i64 10 }, %Connection { i64 2, [10 x i8] c"link2\00\00\00\00\00", i64 20 }, %Connection { i64 3, [10 x i8] c"link3\00\00\00\00\00", i64 30 }], align 16 -@.str = private unnamed_addr constant [4 x i8] c"\1F\C2\8B\00", align 1 -@.str.7 = private unnamed_addr constant [32 x i8] c"*** Word \22%s\22 on line %d is not\00", align 1 +@test_a = local_unnamed_addr global { i32, i32, [8 x i32] } { i32 0, i32 2, [8 x i32] zeroinitializer }, align 16 +@test_str = local_unnamed_addr global [10 x i8] c"x\00\00\00\00\00\00\00\00\00", align 1 +@test_arr = local_unnamed_addr global { i8*, i8*, [3 x i8*] } zeroinitializer, align 16 +@test_f = local_unnamed_addr global { float, float, [10 x float] } { float 0x3FF3AE1480000000, float 0x40415999A0000000, [10 x float] zeroinitializer }, align 16 +@test_array = local_unnamed_addr global { %Test, %Test, [8 x %Test] } { %Test { i32 2, double 1.200000e+01 }, %Test { i32 3, double 2.400000e+01 }, [8 x %Test] zeroinitializer }, align 16 +@test_b = local_unnamed_addr global { [4 x i32], { i32, i32, i32, i32 }, { i32, i32, [2 x i32] }, [4 x i32] } { [4 x i32] [i32 1, i32 2, i32 3, i32 4], { i32, i32, i32, i32 } { i32 5, i32 6, i32 7, i32 0 }, { i32, i32, [2 x i32] } { i32 8, i32 9, [2 x i32] zeroinitializer }, [4 x i32] zeroinitializer }, align 16 +@test_link = local_unnamed_addr global [3 x %Connection] [%Connection { i64 1, [10 x i8] c"link1\00\00\00\00\00", i64 10 }, %Connection { i64 2, [10 x i8] c"link2\00\00\00\00\00", i64 20 }, %Connection { i64 3, [10 x i8] c"link3\00\00\00\00\00", i64 30 }], align 16 -declare i32 @test.strcmp(i8*, i8*) #0 +declare i32 @test_strcmp(i8*, i8*) #0 -define i32 @test.test(i8* %0) #0 { +define i32 @test_test(i8* %0) #0 { entry: - %1 = call i32 @test.strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0)) + %1 = call i32 @test_strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0)) ret i32 %1 } -define i32 @test.trys(i8* %0, i32 %1) #0 { +define i32 @test_trys(i8* %0, i32 %1) #0 { entry: %asa = alloca i32, align 4 %val = alloca double, align 8 diff --git a/test/test_suite/clang/2002-04.c3t b/test/test_suite/clang/2002-04.c3t index 5f2861438..8e499d99d 100644 --- a/test/test_suite/clang/2002-04.c3t +++ b/test/test_suite/clang/2002-04.c3t @@ -68,7 +68,7 @@ fn void test2(FooSt y) { /* #expect: test.ll -define i32 @test.main2() #0 { +define i32 @test_main2() #0 { entry: %switch = alloca i32, align 4 br label %loop.cond @@ -110,7 +110,8 @@ loop.exit: ; preds = %loop.cond ret i32 0 } -define double @test.test(i32 %0) #0 { +; Function Attrs: nounwind +define double @test_test(i32 %0) #0 { entry: %student_t = alloca [30 x double], align 16 %1 = bitcast [30 x double]* %student_t to i8* @@ -121,7 +122,11 @@ entry: ret double %3 } -define void @test.loop() #0 { +; Function Attrs: nounwind +declare i64 @func_returning_struct() #0 + +; Function Attrs: nounwind +define void @test_loop() #0 { entry: %result = alloca %St, align 4 %0 = call i64 @func_returning_struct() @@ -130,18 +135,22 @@ entry: ret void } +; Function Attrs: nounwind declare i32 @testF(%FooSt* byval(%FooSt) align 8, float) #0 +; Function Attrs: nounwind declare i32 @testE(i8 zeroext, i16 signext, i8 zeroext, i32, i32, float) #0 -define void @test.test3(%FooSt* %0) #0 { +; Function Attrs: nounwind +define void @test_test3(%FooSt* %0) #0 { entry: %1 = getelementptr inbounds %FooSt, %FooSt* %0, i32 0, i32 1 store i16 1, i16* %1, align 2 ret void } -define void @test.test2(%FooSt* byval(%FooSt) align 8 %0) #0 { +; Function Attrs: nounwind +define void @test_test2(%FooSt* byval(%FooSt) align 8 %0) #0 { entry: %y = alloca %FooSt, align 4 %indirectarg = alloca %FooSt, align 8 @@ -168,7 +177,7 @@ entry: %17 = bitcast %FooSt* %indirectarg1 to i8* %18 = bitcast %FooSt* %y to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %17, i8* align 4 %18, i32 20, i1 false) - call void @test.test2(%FooSt* byval(%FooSt) align 8 %indirectarg1) - call void @test.test3(%FooSt* %y) + call void @test_test2(%FooSt* byval(%FooSt) align 8 %indirectarg1) + call void @test_test3(%FooSt* %y) ret void } diff --git a/test/test_suite/compile_time/compile_time_array.c3t b/test/test_suite/compile_time/compile_time_array.c3t index de1e12a74..f67c3ddb2 100644 --- a/test/test_suite/compile_time/compile_time_array.c3t +++ b/test/test_suite/compile_time/compile_time_array.c3t @@ -18,7 +18,7 @@ fn void test() @.str = private unnamed_addr constant [2 x i8] c"a\00", align 1 -define void @test.test() #0 { +define void @test_test() #0 { entry: %x = alloca i32, align 4 %z = alloca %"char[]", align 8 diff --git a/test/test_suite/compile_time/compile_time_array_ref.c3t b/test/test_suite/compile_time/compile_time_array_ref.c3t index 16c74f356..aed2889fe 100644 --- a/test/test_suite/compile_time/compile_time_array_ref.c3t +++ b/test/test_suite/compile_time/compile_time_array_ref.c3t @@ -12,12 +12,13 @@ fn void test() /* #expect: foo.ll -@foo.stack = local_unnamed_addr global [8192 x i8] zeroinitializer, align 16 -@foo.x = local_unnamed_addr global i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @foo.stack, i64 0, i64 1000), align 8 -@test.y = internal unnamed_addr global [2 x i8] zeroinitializer, align 1 -@test.z = internal unnamed_addr global i8* getelementptr inbounds ([2 x i8], [2 x i8]* @test.y, i64 0, i64 1), align 8 +@foo_stack = local_unnamed_addr global [8192 x i8] zeroinitializer, align 16 +@foo_x = local_unnamed_addr global i8* getelementptr inbounds ([8192 x i8], [8192 x i8]* @foo_stack, i64 0, i64 1000), align 8 +@"test$y" = internal unnamed_addr global [2 x i8] zeroinitializer, align 1 +@"test$z" = internal unnamed_addr global i8* getelementptr inbounds ([2 x i8], [2 x i8]* @"test$y", i64 0, i64 1), align 8 + ; Function Attrs: nounwind -define void @foo.test() #0 { +define void @foo_test() #0 { entry: ret void -} \ No newline at end of file +} diff --git a/test/test_suite/compile_time/compile_time_bitops.c3t b/test/test_suite/compile_time/compile_time_bitops.c3t index 573a5aac9..92f924f2b 100644 --- a/test/test_suite/compile_time/compile_time_bitops.c3t +++ b/test/test_suite/compile_time/compile_time_bitops.c3t @@ -10,9 +10,9 @@ int y3 = ~4; /* #expect: foo.ll -@foo.x1 = local_unnamed_addr global i32 6, align 4 -@foo.x2 = local_unnamed_addr global i32 6, align 4 -@foo.x3 = local_unnamed_addr global i32 0, align 4 -@foo.y1 = local_unnamed_addr global i32 16, align 4 -@foo.y2 = local_unnamed_addr global i32 1, align 4 -@foo.y3 = local_unnamed_addr global i32 -5, align 4 \ No newline at end of file +@foo_x1 = local_unnamed_addr global i32 6, align 4 +@foo_x2 = local_unnamed_addr global i32 6, align 4 +@foo_x3 = local_unnamed_addr global i32 0, align 4 +@foo_y1 = local_unnamed_addr global i32 16, align 4 +@foo_y2 = local_unnamed_addr global i32 1, align 4 +@foo_y3 = local_unnamed_addr global i32 -5, align 4 \ No newline at end of file diff --git a/test/test_suite/compile_time/compile_time_ptr_ref.c3t b/test/test_suite/compile_time/compile_time_ptr_ref.c3t index 6d07169b1..83bf64236 100644 --- a/test/test_suite/compile_time/compile_time_ptr_ref.c3t +++ b/test/test_suite/compile_time/compile_time_ptr_ref.c3t @@ -13,10 +13,10 @@ int ptr = 0; %"int*[]" = type { i32**, i64 } -@.taddr = private global [5 x i32*] [i32* @test.ptr, i32* @test.ptr, i32* getelementptr inbounds (i32, i32* @test.ptr, i64 1), i32* getelementptr (i32, i32* @test.ptr, i64 -1), i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test.ptr to i8*), i64 -4) to i32*)], align 8 -@test.blurp = local_unnamed_addr global %"int*[]" { i32** getelementptr inbounds ([5 x i32*], [5 x i32*]* @.taddr, i32 0, i32 0), i64 5 }, align 8 -@test.c = local_unnamed_addr global i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test.ptr to i8*), i64 -4) to i32*), align 8 -@test.c2 = local_unnamed_addr global i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test.ptr to i8*), i64 4) to i32*), align 8 -@test.c3 = local_unnamed_addr global i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test.ptr to i8*), i64 4) to i32*), align 8 -@test.ff = local_unnamed_addr global i64 ptrtoint (i32* @test.ptr to i64), align 8 -@test.ptr = global i32 0, align 4 \ No newline at end of file +@.taddr = private global [5 x i32*] [i32* @test_ptr, i32* @test_ptr, i32* getelementptr inbounds (i32, i32* @test_ptr, i64 1), i32* getelementptr (i32, i32* @test_ptr, i64 -1), i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test_ptr to i8*), i64 -4) to i32*)], align 8 +@test_blurp = local_unnamed_addr global %"int*[]" { i32** getelementptr inbounds ([5 x i32*], [5 x i32*]* @.taddr, i32 0, i32 0), i64 5 }, align 8 +@test_c = local_unnamed_addr global i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test_ptr to i8*), i64 -4) to i32*), align 8 +@test_c2 = local_unnamed_addr global i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test_ptr to i8*), i64 4) to i32*), align 8 +@test_c3 = local_unnamed_addr global i32* bitcast (i8* getelementptr (i8, i8* bitcast (i32* @test_ptr to i8*), i64 4) to i32*), align 8 +@test_ff = local_unnamed_addr global i64 ptrtoint (i32* @test_ptr to i64), align 8 +@test_ptr = global i32 0, align 4 \ No newline at end of file diff --git a/test/test_suite/compile_time/ct_eval.c3t b/test/test_suite/compile_time/ct_eval.c3t index 9b5506e7a..55f6e312b 100644 --- a/test/test_suite/compile_time/ct_eval.c3t +++ b/test/test_suite/compile_time/ct_eval.c3t @@ -11,7 +11,7 @@ fn void main() } /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %abc = alloca i32, align 4 store i32 20, i32* %abc, align 4 diff --git a/test/test_suite/compile_time/ct_for.c3t b/test/test_suite/compile_time/ct_for.c3t index 5f3891800..0d86c654a 100644 --- a/test/test_suite/compile_time/ct_for.c3t +++ b/test/test_suite/compile_time/ct_for.c3t @@ -19,7 +19,7 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: call void (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i32 0) call void (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i32 1) diff --git a/test/test_suite/compile_time/ct_foreach.c3t b/test/test_suite/compile_time/ct_foreach.c3t index d4f8f5fc7..02cfb3830 100644 --- a/test/test_suite/compile_time/ct_foreach.c3t +++ b/test/test_suite/compile_time/ct_foreach.c3t @@ -28,7 +28,7 @@ fn void main() } /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %z = alloca i32, align 4 %z1 = alloca [3 x i8]*, align 8 diff --git a/test/test_suite/compile_time/ct_if.c3t b/test/test_suite/compile_time/ct_if.c3t index 4432be030..296572c9a 100644 --- a/test/test_suite/compile_time/ct_if.c3t +++ b/test/test_suite/compile_time/ct_if.c3t @@ -58,8 +58,8 @@ $endif; // #expect: ct_if.ll -@ct_if.d = local_unnamed_addr global i32 5, align 4 -@ct_if.c = local_unnamed_addr global i32 5, align 4 -@ct_if.b = local_unnamed_addr global i32 4, align 4 -@ct_if.a = local_unnamed_addr global i32 3, align 4 -@ct_if.x = local_unnamed_addr global i32 1, align 4 \ No newline at end of file +@ct_if_d = local_unnamed_addr global i32 5, align 4 +@ct_if_c = local_unnamed_addr global i32 5, align 4 +@ct_if_b = local_unnamed_addr global i32 4, align 4 +@ct_if_a = local_unnamed_addr global i32 3, align 4 +@ct_if_x = local_unnamed_addr global i32 1, align 4 \ No newline at end of file diff --git a/test/test_suite/compile_time/ct_switch.c3t b/test/test_suite/compile_time/ct_switch.c3t index 97d4c1575..125f74188 100644 --- a/test/test_suite/compile_time/ct_switch.c3t +++ b/test/test_suite/compile_time/ct_switch.c3t @@ -52,7 +52,7 @@ fn void main() ; Function Attrs: nounwind declare void @printf(i8*, ...) #0 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: call void (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), [5 x i8]* bitcast ([6 x i8]* @.str.1 to [5 x i8]*)) call void (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), [9 x i8]* bitcast ([10 x i8]* @.str.3 to [9 x i8]*)) diff --git a/test/test_suite/compile_time/ct_switch_top_level.c3t b/test/test_suite/compile_time/ct_switch_top_level.c3t index c5f87f0aa..5ffd7cf82 100644 --- a/test/test_suite/compile_time/ct_switch_top_level.c3t +++ b/test/test_suite/compile_time/ct_switch_top_level.c3t @@ -36,7 +36,7 @@ source_filename = "test" target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" -@test.oeoekgokege = local_unnamed_addr global i32 343432, align 4 +@test_oeoekgokege = local_unnamed_addr global i32 343432, align 4 @.str = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 diff --git a/test/test_suite/compile_time/ct_switch_type_check.c3t b/test/test_suite/compile_time/ct_switch_type_check.c3t index 15e5cb4ee..da7da4389 100644 --- a/test/test_suite/compile_time/ct_switch_type_check.c3t +++ b/test/test_suite/compile_time/ct_switch_type_check.c3t @@ -35,7 +35,7 @@ fn void main() ; Function Attrs: nounwind declare void @printf(i8*, ...) #0 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: call void (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), [3 x i8]* bitcast ([4 x i8]* @.str.1 to [3 x i8]*)) call void (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), [6 x i8]* bitcast ([7 x i8]* @.str.3 to [6 x i8]*)) diff --git a/test/test_suite/compile_time/stringify.c3t b/test/test_suite/compile_time/stringify.c3t index b7e3846c8..7f1df621b 100644 --- a/test/test_suite/compile_time/stringify.c3t +++ b/test/test_suite/compile_time/stringify.c3t @@ -42,7 +42,7 @@ fn void main() @.str.4 = private unnamed_addr constant [10 x i8] c"1 + 3 + a\00", align 1 @.str.5 = private unnamed_addr constant [15 x i8] c"Result was %d\0A\00", align 1 -define void @test.test() #0 { +define void @test_test() #0 { entry: %i = alloca i32, align 4 store i32 0, i32* %i, align 4 @@ -65,7 +65,7 @@ loop.exit: ; preds = %loop.cond ret void } -define void @test.main() #0 { +define void @test_main() #0 { entry: %t = alloca i64, align 8 %diff = alloca i64, align 8 @@ -76,7 +76,7 @@ entry: %diff2 = alloca i64, align 8 %0 = call i64 @clock() store i64 %0, i64* %t, align 8 - call void @test.test() + call void @test_test() %1 = call i64 @clock() %2 = load i64, i64* %t, align 8 %sub = sub i64 %1, %2 @@ -104,6 +104,6 @@ entry: define i32 @main(i32 %0, i8** %1) #0 { entry: - call void @test.main() + call void @test_main() ret i32 0 } diff --git a/test/test_suite/compile_time/ternary_folding.c3t b/test/test_suite/compile_time/ternary_folding.c3t index 4381ae445..b57db3ad4 100644 --- a/test/test_suite/compile_time/ternary_folding.c3t +++ b/test/test_suite/compile_time/ternary_folding.c3t @@ -13,11 +13,11 @@ fn int test2() { return 3; } // #expect: ternary_folding.ll -@ternary_folding.foo = local_unnamed_addr global i32 1, align 4 -@ternary_folding.bar = local_unnamed_addr global double 2.000000e+00, align 8 -@ternary_folding.baz = local_unnamed_addr global i8 0, align 1 +@ternary_folding_foo = local_unnamed_addr global i32 1, align 4 +@ternary_folding_bar = local_unnamed_addr global double 2.000000e+00, align 8 +@ternary_folding_baz = local_unnamed_addr global i8 0, align 1 -define void @ternary_folding.test() #0 { +define void @ternary_folding_test() #0 { entry: %x = alloca i32, align 4 store i32 0, i32* %x, align 4 diff --git a/test/test_suite/compile_time_introspection/alignof.c3t b/test/test_suite/compile_time_introspection/alignof.c3t index 42cd77311..12f3530e1 100644 --- a/test/test_suite/compile_time_introspection/alignof.c3t +++ b/test/test_suite/compile_time_introspection/alignof.c3t @@ -65,26 +65,26 @@ int z05 = $alignof(Foob.c[5]); // #expect: foo.ll -@foo.x = local_unnamed_addr global i64 16, align 8 -@foo.y = local_unnamed_addr global i16 8, align 2 -@foo.z = local_unnamed_addr global i32 8, align 4 -@foo.w = local_unnamed_addr global i32 8, align 4 -@foo.v = local_unnamed_addr global i32 4, align 4 -@foo.x1 = local_unnamed_addr global i32 8, align 4 -@foo.x2 = local_unnamed_addr global i32 8, align 4 -@foo.x3 = local_unnamed_addr global i32 1, align 4 -@foo.x4 = local_unnamed_addr global i32 4, align 4 -@foo.x5 = local_unnamed_addr global i32 4, align 4 -@foo.x6 = local_unnamed_addr global i32 4, align 4 -@foo.x7 = local_unnamed_addr global i32 4, align 4 -@foo.x8 = local_unnamed_addr global i32 8, align 4 -@foo.x9 = local_unnamed_addr global i32 4, align 4 -@foo.x10 = local_unnamed_addr global i32 4, align 4 -@foo.x11 = local_unnamed_addr global i32 4, align 4 -@foo.z0 = local_unnamed_addr global i32 8, align 4 -@foo.z00 = local_unnamed_addr global i32 8, align 4 -@foo.z01 = local_unnamed_addr global i32 1, align 4 -@foo.z02 = local_unnamed_addr global i32 2, align 4 -@foo.z03 = local_unnamed_addr global i32 1, align 4 -@foo.z04 = local_unnamed_addr global i32 4, align 4 -@foo.z05 = local_unnamed_addr global i32 1, align 4 \ No newline at end of file +@foo_x = local_unnamed_addr global i64 16, align 8 +@foo_y = local_unnamed_addr global i16 8, align 2 +@foo_z = local_unnamed_addr global i32 8, align 4 +@foo_w = local_unnamed_addr global i32 8, align 4 +@foo_v = local_unnamed_addr global i32 4, align 4 +@foo_x1 = local_unnamed_addr global i32 8, align 4 +@foo_x2 = local_unnamed_addr global i32 8, align 4 +@foo_x3 = local_unnamed_addr global i32 1, align 4 +@foo_x4 = local_unnamed_addr global i32 4, align 4 +@foo_x5 = local_unnamed_addr global i32 4, align 4 +@foo_x6 = local_unnamed_addr global i32 4, align 4 +@foo_x7 = local_unnamed_addr global i32 4, align 4 +@foo_x8 = local_unnamed_addr global i32 8, align 4 +@foo_x9 = local_unnamed_addr global i32 4, align 4 +@foo_x10 = local_unnamed_addr global i32 4, align 4 +@foo_x11 = local_unnamed_addr global i32 4, align 4 +@foo_z0 = local_unnamed_addr global i32 8, align 4 +@foo_z00 = local_unnamed_addr global i32 8, align 4 +@foo_z01 = local_unnamed_addr global i32 1, align 4 +@foo_z02 = local_unnamed_addr global i32 2, align 4 +@foo_z03 = local_unnamed_addr global i32 1, align 4 +@foo_z04 = local_unnamed_addr global i32 4, align 4 +@foo_z05 = local_unnamed_addr global i32 1, align 4 \ No newline at end of file diff --git a/test/test_suite/compile_time_introspection/defined.c3t b/test/test_suite/compile_time_introspection/defined.c3t index 7e38e6885..ed7146453 100644 --- a/test/test_suite/compile_time_introspection/defined.c3t +++ b/test/test_suite/compile_time_introspection/defined.c3t @@ -61,7 +61,7 @@ fn void main() // #expect: mymodule.ll -define void @mymodule.main() #0 { +define void @mymodule_main() #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 diff --git a/test/test_suite/compile_time_introspection/defined_builtin.c3t b/test/test_suite/compile_time_introspection/defined_builtin.c3t index bb6beae20..9acaede32 100644 --- a/test/test_suite/compile_time_introspection/defined_builtin.c3t +++ b/test/test_suite/compile_time_introspection/defined_builtin.c3t @@ -8,7 +8,7 @@ fn void test() /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %a = alloca i8, align 1 %b = alloca i8, align 1 diff --git a/test/test_suite/compile_time_introspection/nameof.c3t b/test/test_suite/compile_time_introspection/nameof.c3t index 15955b697..c8eecbcea 100644 --- a/test/test_suite/compile_time_introspection/nameof.c3t +++ b/test/test_suite/compile_time_introspection/nameof.c3t @@ -43,9 +43,9 @@ fn void main() @.str.6 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.7 = private unnamed_addr constant [4 x i8] c"Foo\00", align 1 @.str.8 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.9 = private unnamed_addr constant [13 x i8] c"mymodule.Foo\00", align 1 +@.str.9 = private unnamed_addr constant [13 x i8] c"mymodule_Foo\00", align 1 @.str.10 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.11 = private unnamed_addr constant [13 x i8] c"mymodule.Foo\00", align 1 +@.str.11 = private unnamed_addr constant [13 x i8] c"mymodule_Foo\00", align 1 @.str.12 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.13 = private unnamed_addr constant [12 x i8] c"mymodule::b\00", align 1 @.str.14 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @@ -55,9 +55,9 @@ fn void main() @.str.18 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.19 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @.str.20 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.21 = private unnamed_addr constant [11 x i8] c"mymodule.b\00", align 1 +@.str.21 = private unnamed_addr constant [11 x i8] c"mymodule_b\00", align 1 @.str.22 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.23 = private unnamed_addr constant [11 x i8] c"mymodule.b\00", align 1 +@.str.23 = private unnamed_addr constant [11 x i8] c"mymodule_b\00", align 1 @.str.24 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.25 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @.str.26 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 diff --git a/test/test_suite/compile_time_introspection/offsetof.c3t b/test/test_suite/compile_time_introspection/offsetof.c3t index 456bb1cb8..7a31f7f53 100644 --- a/test/test_suite/compile_time_introspection/offsetof.c3t +++ b/test/test_suite/compile_time_introspection/offsetof.c3t @@ -53,18 +53,18 @@ int z02 = $offsetof(Foob.c[5]); int z03 = $offsetof(Foob.a); // #expect: foo.ll -@foo.y = local_unnamed_addr global i16 16, align 2 -@foo.z = local_unnamed_addr global i32 16, align 4 -@foo.w = local_unnamed_addr global i32 16, align 4 -@foo.x1 = local_unnamed_addr global i32 3, align 4 -@foo.x2 = local_unnamed_addr global i32 4, align 4 -@foo.x4 = local_unnamed_addr global i32 16, align 4 -@foo.x6 = local_unnamed_addr global i32 20, align 4 -@foo.x5 = local_unnamed_addr global i32 16, align 4 -@foo.x7 = local_unnamed_addr global i32 28, align 4 -@foo.x8 = local_unnamed_addr global i32 24, align 4 -@foo.z0 = local_unnamed_addr global i32 0, align 4 -@foo.z00 = local_unnamed_addr global i32 0, align 4 -@foo.z01 = local_unnamed_addr global i32 1, align 4 -@foo.z02 = local_unnamed_addr global i32 5, align 4 -@foo.z03 = local_unnamed_addr global i32 0, align 4 +@foo_y = local_unnamed_addr global i16 16, align 2 +@foo_z = local_unnamed_addr global i32 16, align 4 +@foo_w = local_unnamed_addr global i32 16, align 4 +@foo_x1 = local_unnamed_addr global i32 3, align 4 +@foo_x2 = local_unnamed_addr global i32 4, align 4 +@foo_x4 = local_unnamed_addr global i32 16, align 4 +@foo_x6 = local_unnamed_addr global i32 20, align 4 +@foo_x5 = local_unnamed_addr global i32 16, align 4 +@foo_x7 = local_unnamed_addr global i32 28, align 4 +@foo_x8 = local_unnamed_addr global i32 24, align 4 +@foo_z0 = local_unnamed_addr global i32 0, align 4 +@foo_z00 = local_unnamed_addr global i32 0, align 4 +@foo_z01 = local_unnamed_addr global i32 1, align 4 +@foo_z02 = local_unnamed_addr global i32 5, align 4 +@foo_z03 = local_unnamed_addr global i32 0, align 4 diff --git a/test/test_suite/compile_time_introspection/qnameof.c3t b/test/test_suite/compile_time_introspection/qnameof.c3t index 7cb9fff86..2a1af2fdf 100644 --- a/test/test_suite/compile_time_introspection/qnameof.c3t +++ b/test/test_suite/compile_time_introspection/qnameof.c3t @@ -40,7 +40,7 @@ fn void main() @.str.16 = private unnamed_addr constant [15 x i8] c"Blob**[3]: %s\0A\00", align 1 @.str.17 = private unnamed_addr constant [10 x i8] c"Blob**[3]\00", align 1 -define void @qnametest.main() +define void @qnametest_main() %help = alloca i32, align 4 store i32 0, i32* %help, align 4 %0 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0), [6 x i8]* bitcast ([7 x i8]* @.str.1 to [6 x i8]*)) diff --git a/test/test_suite/compile_time_introspection/sizeof.c3t b/test/test_suite/compile_time_introspection/sizeof.c3t index 772d36ae2..531ab71eb 100644 --- a/test/test_suite/compile_time_introspection/sizeof.c3t +++ b/test/test_suite/compile_time_introspection/sizeof.c3t @@ -48,19 +48,19 @@ struct Foo // #expect: foo.ll -@foo.x = local_unnamed_addr global i64 64, align 8 -@foo.y = local_unnamed_addr global i16 64, align 2 -@foo.z = local_unnamed_addr global i32 64, align 4 -@foo.w = local_unnamed_addr global i32 64, align 4 -@foo.v = local_unnamed_addr global i32 1, align 4 -@foo.x1 = local_unnamed_addr global i32 8, align 4 -@foo.y1 = local_unnamed_addr global i32 2, align 4 -@foo.a = local_unnamed_addr global i32 60, align 4 -@foo.b = local_unnamed_addr global i32 5, align 4 -@foo.c = local_unnamed_addr global i32 5, align 4 -@foo.d = local_unnamed_addr global i32 1600, align 4 -@foo.e = local_unnamed_addr global i32 8, align 4 -@foo.a2 = local_unnamed_addr global i32 60, align 4 -@foo.a3 = local_unnamed_addr global i32 60, align 4 -@foo.a4 = local_unnamed_addr global i32 60, align 4 -@foo.a5 = local_unnamed_addr global i32 60, align 4 \ No newline at end of file +@foo_x = local_unnamed_addr global i64 64, align 8 +@foo_y = local_unnamed_addr global i16 64, align 2 +@foo_z = local_unnamed_addr global i32 64, align 4 +@foo_w = local_unnamed_addr global i32 64, align 4 +@foo_v = local_unnamed_addr global i32 1, align 4 +@foo_x1 = local_unnamed_addr global i32 8, align 4 +@foo_y1 = local_unnamed_addr global i32 2, align 4 +@foo_a = local_unnamed_addr global i32 60, align 4 +@foo_b = local_unnamed_addr global i32 5, align 4 +@foo_c = local_unnamed_addr global i32 5, align 4 +@foo_d = local_unnamed_addr global i32 1600, align 4 +@foo_e = local_unnamed_addr global i32 8, align 4 +@foo_a2 = local_unnamed_addr global i32 60, align 4 +@foo_a3 = local_unnamed_addr global i32 60, align 4 +@foo_a4 = local_unnamed_addr global i32 60, align 4 +@foo_a5 = local_unnamed_addr global i32 60, align 4 \ No newline at end of file diff --git a/test/test_suite/constants/byte_literals.c3t b/test/test_suite/constants/byte_literals.c3t index 1a68db76d..211c5974c 100644 --- a/test/test_suite/constants/byte_literals.c3t +++ b/test/test_suite/constants/byte_literals.c3t @@ -6,8 +6,8 @@ char[*] foo64 = b64"SGVsbG8gV29ybGQ="; // #expect: byte_literals.ll -@byte_literals.foob = local_unnamed_addr global [1 x i8] c"\A0", align 1 -@byte_literals.fooz = local_unnamed_addr global [7 x i8] c"\00\AA\BB\CC\DD\EE\FF", align 1 -@byte_literals.fooy = local_unnamed_addr global [4 x i8] c"\DE\AD\BE\EF", align 1 -@byte_literals.foow = local_unnamed_addr global [5 x i8] c"EI#M\ED", align 1 -@byte_literals.foo64 = local_unnamed_addr global [11 x i8] c"Hello World", align 1 +@byte_literals_foob = local_unnamed_addr global [1 x i8] c"\A0", align 1 +@byte_literals_fooz = local_unnamed_addr global [7 x i8] c"\00\AA\BB\CC\DD\EE\FF", align 1 +@byte_literals_fooy = local_unnamed_addr global [4 x i8] c"\DE\AD\BE\EF", align 1 +@byte_literals_foow = local_unnamed_addr global [5 x i8] c"EI#M\ED", align 1 +@byte_literals_foo64 = local_unnamed_addr global [11 x i8] c"Hello World", align 1 diff --git a/test/test_suite/constants/char_literals.c3t b/test/test_suite/constants/char_literals.c3t index c4bbb0d6b..a4ed8ce35 100644 --- a/test/test_suite/constants/char_literals.c3t +++ b/test/test_suite/constants/char_literals.c3t @@ -13,12 +13,12 @@ char i = '\e'; // #expect: test.ll -@test.a = local_unnamed_addr global i8 32, align 1 -@test.b = local_unnamed_addr global i8 13, align 1 -@test.c = local_unnamed_addr global i8 9, align 1 -@test.d = local_unnamed_addr global i8 10, align 1 -@test.e = local_unnamed_addr global i8 0, align 1 -@test.f = local_unnamed_addr global i8 39, align 1 -@test.g = local_unnamed_addr global i8 34, align 1 -@test.h = local_unnamed_addr global i8 92, align 1 -@test.i = local_unnamed_addr global i8 27, align 1 +@test_a = local_unnamed_addr global i8 32, align 1 +@test_b = local_unnamed_addr global i8 13, align 1 +@test_c = local_unnamed_addr global i8 9, align 1 +@test_d = local_unnamed_addr global i8 10, align 1 +@test_e = local_unnamed_addr global i8 0, align 1 +@test_f = local_unnamed_addr global i8 39, align 1 +@test_g = local_unnamed_addr global i8 34, align 1 +@test_h = local_unnamed_addr global i8 92, align 1 +@test_i = local_unnamed_addr global i8 27, align 1 diff --git a/test/test_suite/constants/const_var_copy.c3t b/test/test_suite/constants/const_var_copy.c3t index dfb2260ed..d2c1dcd8e 100644 --- a/test/test_suite/constants/const_var_copy.c3t +++ b/test/test_suite/constants/const_var_copy.c3t @@ -11,15 +11,15 @@ fn void test(int z) /* #expect: foo.ll -@foo.FOO = local_unnamed_addr constant { [50 x i8], i8, [49 x i8] } { [50 x i8] zeroinitializer, i8 1, [49 x i8] zeroinitializer }, align 16 -@foo.BAR = local_unnamed_addr constant <4 x i32> , align 16 +@foo_FOO = local_unnamed_addr constant { [50 x i8], i8, [49 x i8] } { [50 x i8] zeroinitializer, i8 1, [49 x i8] zeroinitializer }, align 16 +@foo_BAR = local_unnamed_addr constant <4 x i32> , align 16 -define void @foo.test(i32 %0) #0 { +define void @foo_test(i32 %0) #0 { entry: %s = alloca i8, align 1 %zd = alloca i32, align 4 %sisiext = sext i32 %0 to i64 - %1 = getelementptr inbounds [100 x i8], [100 x i8]* bitcast ({ [50 x i8], i8, [49 x i8] }* @foo.FOO to [100 x i8]*), i64 0, i64 %sisiext + %1 = getelementptr inbounds [100 x i8], [100 x i8]* bitcast ({ [50 x i8], i8, [49 x i8] }* @foo_FOO to [100 x i8]*), i64 0, i64 %sisiext %2 = load i8, i8* %1, align 1 store i8 %2, i8* %s, align 1 %sisiext1 = sext i32 %0 to i64 diff --git a/test/test_suite/constants/constants.c3t b/test/test_suite/constants/constants.c3t index 0b5c28082..ece162a23 100644 --- a/test/test_suite/constants/constants.c3t +++ b/test/test_suite/constants/constants.c3t @@ -19,15 +19,15 @@ fn void test() // #expect: constants.ll -@constants.AA = protected unnamed_addr constant i8 -1, align 1 -@constants.BB = local_unnamed_addr constant i8 -56, align 1 -@constants.CC = protected unnamed_addr constant i32 -1, align 4 -@constants.DD = protected unnamed_addr constant i32 -1, align 4 -@constants.x = protected unnamed_addr global i32 255, align 4 -@constants.z = protected unnamed_addr global i32 -1, align 4 -@constants.w = protected unnamed_addr global i8 -1, align 1 -@constants.v = protected unnamed_addr global i16 -1, align 2 -@constants.z2 = protected unnamed_addr global i32 -1, align 4 +@constants_AA = protected unnamed_addr constant i8 -1, align 1 +@constants_BB = local_unnamed_addr constant i8 -56, align 1 +@constants_CC = protected unnamed_addr constant i32 -1, align 4 +@constants_DD = protected unnamed_addr constant i32 -1, align 4 +@constants_x = protected unnamed_addr global i32 255, align 4 +@constants_z = protected unnamed_addr global i32 -1, align 4 +@constants_w = protected unnamed_addr global i8 -1, align 1 +@constants_v = protected unnamed_addr global i16 -1, align 2 +@constants_z2 = protected unnamed_addr global i32 -1, align 4 entry: %xx = alloca i32 diff --git a/test/test_suite/contracts/simple_test.c3t b/test/test_suite/contracts/simple_test.c3t index bee981abb..3df7b7166 100644 --- a/test/test_suite/contracts/simple_test.c3t +++ b/test/test_suite/contracts/simple_test.c3t @@ -43,7 +43,7 @@ fn void main() /* #expect: simple_test.ll -define void @simple_test.test(i32* %0, i32 %1) #0 { +define void @simple_test_test(i32* %0, i32 %1) #0 { entry: %gt = icmp sgt i32 %1, 100 call void @llvm.assume(i1 %gt) @@ -51,7 +51,7 @@ entry: ret void } -define i32 @simple_test.test2(i32* %0, i32 %1) #0 { +define i32 @simple_test_test2(i32* %0, i32 %1) #0 { entry: %gt = icmp sgt i32 %1, 100 call void @llvm.assume(i1 %gt) @@ -59,7 +59,7 @@ entry: ret i32 %1 } -define i32 @simple_test.test3(i32 %0) #0 { +define i32 @simple_test_test3(i32 %0) #0 { entry: %gt = icmp sgt i32 %0, 0 call void @llvm.assume(i1 %gt) @@ -67,13 +67,13 @@ entry: ret i32 %add } -define void @simple_test.main() #0 { +define void @simple_test_main() #0 { entry: %fooofke = alloca i32, align 4 store i32 0, i32* %fooofke, align 4 - call void @simple_test.test(i32* %fooofke, i32 330) - %0 = call i32 @simple_test.test2(i32* %fooofke, i32 150) - %1 = call i32 @simple_test.test3(i32 123) + call void @simple_test_test(i32* %fooofke, i32 330) + %0 = call i32 @simple_test_test2(i32* %fooofke, i32 150) + %1 = call i32 @simple_test_test3(i32 123) %2 = load i32, i32* %fooofke, align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i32 %2) ret void @@ -81,6 +81,6 @@ entry: define i32 @main(i32 %0, i8** %1) #0 { entry: - call void @simple_test.main() + call void @simple_test_main() ret i32 0 } diff --git a/test/test_suite/debug_symbols/constants.c3t b/test/test_suite/debug_symbols/constants.c3t index 37a0229ee..c90334e96 100644 --- a/test/test_suite/debug_symbols/constants.c3t +++ b/test/test_suite/debug_symbols/constants.c3t @@ -7,22 +7,22 @@ private const FOO = ~(uint)(0); /* #expect: constants.ll -@constants.AA = protected unnamed_addr constant i8 1, align 1 -@constants.BB = local_unnamed_addr constant i8 -56, align 1 -@constants.CC = protected unnamed_addr constant i32 -1, align 4 -@constants.FOO = protected unnamed_addr constant i32 -1, align 4 +@constants_AA = protected unnamed_addr constant i8 1, align 1 +@constants_BB = local_unnamed_addr constant i8 -56, align 1 +@constants_CC = protected unnamed_addr constant i32 -1, align 4 +@constants_FOO = protected unnamed_addr constant i32 -1, align 4 !llvm.dbg.cu = !{!0} !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "c3c", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug !1 = !DIFile(filename: "constants.c3", !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "AA", linkageName: "constants.AA", scope: !1, file: !1, line: 1 +distinct !DIGlobalVariable(name: "AA", linkageName: "constants_AA", scope: !1, file: !1, line: 1 !DIBasicType(name: "char", size: 8, encoding: DW_ATE_unsigned_char) !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "BB", linkageName: "constants.BB", scope: !1, file: !1, line: 2 +distinct !DIGlobalVariable(name: "BB", linkageName: "constants_BB", scope: !1, file: !1, line: 2 !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "CC", linkageName: "constants.CC", scope: !1, file: !1, line: 3 +distinct !DIGlobalVariable(name: "CC", linkageName: "constants_CC", scope: !1, file: !1, line: 3 !DIBasicType(name: "uint", size: 32, encoding: DW_ATE_unsigned) !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "FOO", linkageName: "constants.FOO", scope: !1, file: !1, line: 4 +distinct !DIGlobalVariable(name: "FOO", linkageName: "constants_FOO", scope: !1, file: !1, line: 4 diff --git a/test/test_suite/defer/defer_and_expr_block.c3t b/test/test_suite/defer/defer_and_expr_block.c3t index 5f078b0fd..1eca0d219 100644 --- a/test/test_suite/defer/defer_and_expr_block.c3t +++ b/test/test_suite/defer/defer_and_expr_block.c3t @@ -20,7 +20,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %blockret = alloca i32, align 4 br label %if.then diff --git a/test/test_suite/defer/defer_static_var.c3t b/test/test_suite/defer/defer_static_var.c3t index 870db010f..fb228b656 100644 --- a/test/test_suite/defer/defer_static_var.c3t +++ b/test/test_suite/defer/defer_static_var.c3t @@ -42,35 +42,34 @@ fn void main() /* #expect: foo.ll -@foo.y = internal unnamed_addr global i32 0, align 4 -@main.y = internal unnamed_addr global i32 0, align 4 -@main.y.7 = internal unnamed_addr global i32 0, align 4 -@main.y.12 = internal unnamed_addr global i32 0, align 4 +@"foo$y" = internal unnamed_addr global i32 0, align 4 +@"main$y" = internal unnamed_addr global i32 0, align 4 +@"main$y.7" = internal unnamed_addr global i32 0, align 4 +@"main$y.12" = internal unnamed_addr global i32 0, align 4 - -define i32 @foo.foo(i32 %0) #0 { +define i32 @foo_foo(i32 %0) #0 { entry: %gt = icmp sgt i32 %0, 0 br i1 %gt, label %if.then, label %if.exit if.then: ; preds = %entry - %1 = load i32, i32* @foo.y, align 4 + %1 = load i32, i32* @"foo$y", align 4 %add = add i32 %1, 1 - store i32 %add, i32* @foo.y, align 4 - %2 = load i32, i32* @foo.y, align 4 + store i32 %add, i32* @"foo$y", align 4 + %2 = load i32, i32* @"foo$y", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0), i32 %2) ret i32 2 if.exit: ; preds = %entry - %3 = load i32, i32* @foo.y, align 4 + %3 = load i32, i32* @"foo$y", align 4 %add1 = add i32 %3, 1 - store i32 %add1, i32* @foo.y, align 4 - %4 = load i32, i32* @foo.y, align 4 + store i32 %add1, i32* @"foo$y", align 4 + %4 = load i32, i32* @"foo$y", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0), i32 %4) ret i32 %0 } -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %i = alloca i32, align 4 @@ -78,9 +77,9 @@ entry: %i4 = alloca i32, align 4 %x15 = alloca i32, align 4 %i16 = alloca i32, align 4 - %0 = call i32 @foo.foo(i32 1) - %1 = call i32 @foo.foo(i32 2) - %2 = call i32 @foo.foo(i32 -2) + %0 = call i32 @foo_foo(i32 1) + %1 = call i32 @foo_foo(i32 2) + %2 = call i32 @foo_foo(i32 -2) store i32 0, i32* %x, align 4 %3 = load i32, i32* %x, align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i32 %3) @@ -99,21 +98,21 @@ loop.body: ; preds = %loop.cond br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %loop.body - %7 = load i32, i32* @main.y, align 4 + %7 = load i32, i32* @"main$y", align 4 %add = add i32 %7, 1 - store i32 %add, i32* @main.y, align 4 + store i32 %add, i32* @"main$y", align 4 %8 = load i32, i32* %i, align 4 - %9 = load i32, i32* @main.y, align 4 + %9 = load i32, i32* @"main$y", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0), i32 %8, i32 %9) br label %loop.exit if.exit: ; preds = %loop.body call void (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i32 0, i32 0)) - %10 = load i32, i32* @main.y, align 4 + %10 = load i32, i32* @"main$y", align 4 %add1 = add i32 %10, 1 - store i32 %add1, i32* @main.y, align 4 + store i32 %add1, i32* @"main$y", align 4 %11 = load i32, i32* %i, align 4 - %12 = load i32, i32* @main.y, align 4 + %12 = load i32, i32* @"main$y", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0), i32 %11, i32 %12) %13 = load i32, i32* %i, align 4 %add2 = add i32 %13, 1 @@ -139,21 +138,21 @@ loop.body7: ; preds = %loop.cond5 br i1 %eq8, label %if.then9, label %if.exit11 if.then9: ; preds = %loop.body7 - %18 = load i32, i32* @main.y.7, align 4 + %18 = load i32, i32* @"main$y.7", align 4 %add10 = add i32 %18, 1 - store i32 %add10, i32* @main.y.7, align 4 + store i32 %add10, i32* @"main$y.7", align 4 %19 = load i32, i32* %i4, align 4 - %20 = load i32, i32* @main.y.7, align 4 + %20 = load i32, i32* @"main$y.7", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i32 0, i32 0), i32 %19, i32 %20) br label %loop.exit14 if.exit11: ; preds = %loop.body7 call void (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0)) - %21 = load i32, i32* @main.y.7, align 4 + %21 = load i32, i32* @"main$y.7", align 4 %add12 = add i32 %21, 1 - store i32 %add12, i32* @main.y.7, align 4 + store i32 %add12, i32* @"main$y.7", align 4 %22 = load i32, i32* %i4, align 4 - %23 = load i32, i32* @main.y.7, align 4 + %23 = load i32, i32* @"main$y.7", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0), i32 %22, i32 %23) %24 = load i32, i32* %i4, align 4 %add13 = add i32 %24, 1 @@ -179,21 +178,21 @@ loop.body19: ; preds = %loop.cond17 br i1 %eq20, label %if.then21, label %if.exit23 if.then21: ; preds = %loop.body19 - %29 = load i32, i32* @main.y.12, align 4 + %29 = load i32, i32* @"main$y.12", align 4 %add22 = add i32 %29, 1 - store i32 %add22, i32* @main.y.12, align 4 + store i32 %add22, i32* @"main$y.12", align 4 %30 = load i32, i32* %i16, align 4 - %31 = load i32, i32* @main.y.12, align 4 + %31 = load i32, i32* @"main$y.12", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.13, i32 0, i32 0), i32 %30, i32 %31) br label %loop.exit26 if.exit23: ; preds = %loop.body19 call void (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i32 0, i32 0)) - %32 = load i32, i32* @main.y.12, align 4 + %32 = load i32, i32* @"main$y.12", align 4 %add24 = add i32 %32, 1 - store i32 %add24, i32* @main.y.12, align 4 + store i32 %add24, i32* @"main$y.12", align 4 %33 = load i32, i32* %i16, align 4 - %34 = load i32, i32* @main.y.12, align 4 + %34 = load i32, i32* @"main$y.12", align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i32 0, i32 0), i32 %33, i32 %34) %35 = load i32, i32* %i16, align 4 %add25 = add i32 %35, 1 diff --git a/test/test_suite/distinct/distinct_voidptr_null.c3t b/test/test_suite/distinct/distinct_voidptr_null.c3t index 241c81e3b..c983ef398 100644 --- a/test/test_suite/distinct/distinct_voidptr_null.c3t +++ b/test/test_suite/distinct/distinct_voidptr_null.c3t @@ -13,7 +13,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %f = alloca i8*, align 8 store i8* null, i8** %f, align 8 diff --git a/test/test_suite/enumerations/compile_time.c3t b/test/test_suite/enumerations/compile_time.c3t index e014657f8..1e7e7c21f 100644 --- a/test/test_suite/enumerations/compile_time.c3t +++ b/test/test_suite/enumerations/compile_time.c3t @@ -11,6 +11,6 @@ int myenum_sizeof = MyEnum.sizeof; // #expect: compile_time.ll -@compile_time.myenum_elements = local_unnamed_addr global i32 3, align 4 -@compile_time.myenum_alignof = local_unnamed_addr global i32 2, align 4 -@compile_time.myenum_sizeof = local_unnamed_addr global i32 2, align 4 \ No newline at end of file +@compile_time_myenum_elements = local_unnamed_addr global i32 3, align 4 +@compile_time_myenum_alignof = local_unnamed_addr global i32 2, align 4 +@compile_time_myenum_sizeof = local_unnamed_addr global i32 2, align 4 \ No newline at end of file diff --git a/test/test_suite/enumerations/enum_associated_value.c3t b/test/test_suite/enumerations/enum_associated_value.c3t index 8487dddec..f6a117193 100644 --- a/test/test_suite/enumerations/enum_associated_value.c3t +++ b/test/test_suite/enumerations/enum_associated_value.c3t @@ -18,15 +18,16 @@ fn void main() /* #expect: test.ll -@.typeid.test.Foo = linkonce constant { i8, i64, i64 } { i8 8, i64 2, i64 2 }, align 8 -@test.Foo.val = linkonce constant [2 x i32] [i32 123, i32 333], align 4 +@"ct$uint" = linkonce constant %.introspect { i8 3, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 8, i64 4, i64 ptrtoint (%.introspect* @"ct$uint" to i64), i64 2, [0 x i64] zeroinitializer }, align 8 +@"test_Foo$val" = linkonce constant [2 x i32] [i32 123, i32 333], align 4 @.str = private unnamed_addr constant [9 x i8] c"Number A\00", align 1 @.str.1 = private unnamed_addr constant [9 x i8] c"Number B\00", align 1 -@test.Foo.testme = linkonce constant [2 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0)], align 8 +@"test_Foo$testme" = linkonce constant [2 x i8*] [i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0)], align 8 @.str.2 = private unnamed_addr constant [17 x i8] c"%d (%s) %d (%s)\0A\00", align 1 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %x = alloca i32, align 4 %f = alloca i32, align 4 @@ -35,16 +36,16 @@ entry: store i32 1, i32* %f, align 4 store i32 0, i32* %g, align 4 %0 = load i32, i32* %f, align 4 - %1 = getelementptr inbounds [2 x i32], [2 x i32]* @test.Foo.val, i32 0, i32 %0 + %1 = getelementptr inbounds [2 x i32], [2 x i32]* @"test_Foo$val", i32 0, i32 %0 %2 = load i32, i32* %1, align 4 %3 = load i32, i32* %f, align 4 - %4 = getelementptr inbounds [2 x i8*], [2 x i8*]* @test.Foo.testme, i32 0, i32 %3 + %4 = getelementptr inbounds [2 x i8*], [2 x i8*]* @"test_Foo$testme", i32 0, i32 %3 %5 = load i8*, i8** %4, align 8 %6 = load i32, i32* %g, align 4 - %7 = getelementptr inbounds [2 x i32], [2 x i32]* @test.Foo.val, i32 0, i32 %6 + %7 = getelementptr inbounds [2 x i32], [2 x i32]* @"test_Foo$val", i32 0, i32 %6 %8 = load i32, i32* %7, align 4 %9 = load i32, i32* %g, align 4 - %10 = getelementptr inbounds [2 x i8*], [2 x i8*]* @test.Foo.testme, i32 0, i32 %9 + %10 = getelementptr inbounds [2 x i8*], [2 x i8*]* @"test_Foo$testme", i32 0, i32 %9 %11 = load i8*, i8** %10, align 8 %12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i32 0, i32 0), i32 %2, i8* %5, i32 %8, i8* %11) ret void diff --git a/test/test_suite/enumerations/enum_cast.c3t b/test/test_suite/enumerations/enum_cast.c3t index 7a6b98b46..1cf83ab6e 100644 --- a/test/test_suite/enumerations/enum_cast.c3t +++ b/test/test_suite/enumerations/enum_cast.c3t @@ -35,7 +35,7 @@ fn void test() /* #expect: test.ll -define void @test.test2() #0 { +define void @test_test2() #0 { entry: %ww = alloca i8, align 1 %x = alloca i8, align 1 @@ -47,7 +47,7 @@ entry: ret void } -define void @test.test() #0 { +define void @test_test() #0 { entry: %b = alloca i8, align 1 %z = alloca i32, align 4 diff --git a/test/test_suite/enumerations/enum_values.c3t b/test/test_suite/enumerations/enum_values.c3t index 74b2f190f..9a06a62c3 100644 --- a/test/test_suite/enumerations/enum_values.c3t +++ b/test/test_suite/enumerations/enum_values.c3t @@ -20,11 +20,11 @@ fn void test(int x) %"Foo[]" = type { i32*, i64 } -@test.zfok = local_unnamed_addr global i32 0, align 4 +@test_zfok = local_unnamed_addr global i32 0, align 4 @.taddr = private global [2 x i32] [i32 0, i32 1], align 4 -@test.zw = local_unnamed_addr global %"Foo[]" { i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.taddr, i32 0, i32 0), i64 2 }, align 8 +@test_zw = local_unnamed_addr global %"Foo[]" { i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.taddr, i32 0, i32 0), i64 2 }, align 8 -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %zonk = alloca i32, align 4 %literal = alloca [2 x i32], align 4 diff --git a/test/test_suite/enumerations/simple_inference.c3t b/test/test_suite/enumerations/simple_inference.c3t index d7e057836..54ae20f1c 100644 --- a/test/test_suite/enumerations/simple_inference.c3t +++ b/test/test_suite/enumerations/simple_inference.c3t @@ -14,7 +14,7 @@ fn void test() /* #expect: simple_inference.ll -define void @simple_inference.test() #0 { +define void @simple_inference_test() #0 { entry: %h = alloca i32, align 4 store i32 1, i32* %h, align 4 diff --git a/test/test_suite/errors/anyerr_void.c3t b/test/test_suite/errors/anyerr_void.c3t index 67013d1fb..65156ad91 100644 --- a/test/test_suite/errors/anyerr_void.c3t +++ b/test/test_suite/errors/anyerr_void.c3t @@ -26,14 +26,12 @@ fn void main() /* #expect: anyerr_void.ll -; Function Attrs: nounwind -define i64 @anyerr_void.errorThing() #0 { +define i64 @anyerr_void_errorThing() #0 { entry: - ret i64 ptrtoint (i8* @anyerr_void.MyError.BAR to i64) + ret i64 ptrtoint (i8* @"anyerr_void_MyError$BAR" to i64) } -; Function Attrs: nounwind -define i64 @anyerr_void.errorThing2() #0 { +define i64 @anyerr_void_errorThing2() #0 { entry: %reterr = alloca i64, align 8 ret i64 0 @@ -43,13 +41,13 @@ entry: declare void @printf(i8*, ...) #0 ; Function Attrs: nounwind -define void @anyerr_void.main() #0 { +define void @anyerr_void_main() #0 { entry: %z = alloca i64, align 8 %error_var = alloca i64, align 8 %error_var1 = alloca i64, align 8 store i64 0, i64* %error_var, align 8 - %0 = call i64 @anyerr_void.errorThing() + %0 = call i64 @anyerr_void_errorThing() %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %error @@ -65,10 +63,10 @@ noerr_block: ; preds = %after.errcheck, %er store i64 %1, i64* %z, align 8 %2 = load i64, i64* %z, align 8 call void (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i64 %2) - call void (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i64 ptrtoint (i8* @anyerr_void.MyError.BAR to i64)) - call void (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i64 ptrtoint (i8* @anyerr_void.MyError.FOO to i64)) + call void (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0), i64 ptrtoint (i8* @"anyerr_void_MyError$BAR" to i64)) + call void (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i64 ptrtoint (i8* @"anyerr_void_MyError$FOO" to i64)) store i64 0, i64* %error_var1, align 8 - %3 = call i64 @anyerr_void.errorThing2() + %3 = call i64 @anyerr_void_errorThing2() %not_err2 = icmp eq i64 %3, 0 br i1 %not_err2, label %after.errcheck4, label %error3 diff --git a/test/test_suite/errors/else_checks.c3t b/test/test_suite/errors/else_checks.c3t index d911ce240..5ab8cfdf4 100644 --- a/test/test_suite/errors/else_checks.c3t +++ b/test/test_suite/errors/else_checks.c3t @@ -17,7 +17,7 @@ fn void test() declare i64 @testError(i32*) #0 ; Function Attrs: nounwind -define void @else_checks.test() #0 { +define void @else_checks_test() #0 { entry: %x = alloca double, align 8 %retparam = alloca i32, align 4 diff --git a/test/test_suite/errors/error_regression_2.c3t b/test/test_suite/errors/error_regression_2.c3t index 2a92d18af..c1495b0a7 100644 --- a/test/test_suite/errors/error_regression_2.c3t +++ b/test/test_suite/errors/error_regression_2.c3t @@ -150,7 +150,7 @@ fn void main() /* #expect: test.ll -define void @test.Summary__print(%Summary* %0, i8* %1) #0 { +define void @test_Summary_print(%Summary* %0, i8* %1) #0 { entry: %title = alloca %"char[]", align 8 %2 = getelementptr inbounds %Summary, %Summary* %0, i32 0, i32 0 @@ -183,7 +183,8 @@ cond.phi: ; preds = %cond.rhs, %cond.lhs ret void } -define zeroext i8 @test.contains(i8* %0, i64 %1, i8* %2, i64 %3) #0 { +; Function Attrs: nounwind +define zeroext i8 @test_contains(i8* %0, i64 %1, i8* %2, i64 %3) #0 { entry: %haystack = alloca %"char[]", align 8 %needle = alloca %"char[]", align 8 @@ -262,7 +263,8 @@ loop.exit: ; preds = %loop.cond ret i8 0 } -define i64 @test.readDoc(%Doc* %0, i8* %1, i64 %2) #0 { +; Function Attrs: nounwind +define i64 @test_readDoc(%Doc* %0, i8* %1, i64 %2) #0 { entry: %url = alloca %"char[]", align 8 %taddr = alloca %"char[]", align 8 @@ -313,12 +315,12 @@ entry: %lo1 = load i8*, i8** %9, align 8 %10 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %8, i32 0, i32 1 %hi2 = load i64, i64* %10, align 8 - %11 = call i8 @test.contains(i8* %lo, i64 %hi, i8* %lo1, i64 %hi2) + %11 = call i8 @test_contains(i8* %lo, i64 %hi, i8* %lo1, i64 %hi2) %12 = trunc i8 %11 to i1 br i1 %12, label %if.then, label %if.exit if.then: ; preds = %entry - ret i64 ptrtoint (i8* @test.ReadError.BAD_READ to i64) + ret i64 ptrtoint (i8* @"test_ReadError$BAD_READ" to i64) if.exit: ; preds = %entry %13 = bitcast %"char[]"* %url to { i8*, i64 }* @@ -332,7 +334,7 @@ if.exit: ; preds = %entry %lo6 = load i8*, i8** %17, align 8 %18 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %16, i32 0, i32 1 %hi7 = load i64, i64* %18, align 8 - %19 = call i8 @test.contains(i8* %lo3, i64 %hi4, i8* %lo6, i64 %hi7) + %19 = call i8 @test_contains(i8* %lo3, i64 %hi4, i8* %lo6, i64 %hi7) %20 = trunc i8 %19 to i1 br i1 %20, label %if.then8, label %if.exit9 @@ -356,7 +358,7 @@ if.exit9: ; preds = %if.exit %lo13 = load i8*, i8** %28, align 8 %29 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %27, i32 0, i32 1 %hi14 = load i64, i64* %29, align 8 - %30 = call i8 @test.contains(i8* %lo10, i64 %hi11, i8* %lo13, i64 %hi14) + %30 = call i8 @test_contains(i8* %lo10, i64 %hi11, i8* %lo13, i64 %hi14) %31 = trunc i8 %30 to i1 br i1 %31, label %if.then15, label %if.exit21 @@ -366,7 +368,7 @@ if.then15: ; preds = %if.exit9 store %"char[]"* null, %"char[]"** %33, align 8 %34 = load %Head, %Head* %literal18, align 8 store %Head %34, %Head* %value, align 8 - %35 = call i8* @"std::core::mem.alloc"(i64 8, i64 0) + %35 = call i8* @std_core_mem_alloc(i64 8, i64 0) %ptrptr = bitcast i8* %35 to %Head* store %Head* %ptrptr, %Head** %temp, align 8 %36 = load %Head*, %Head** %temp, align 8 @@ -374,7 +376,7 @@ if.then15: ; preds = %if.exit9 br i1 %not, label %if.then19, label %if.exit20 if.then19: ; preds = %if.then15 - store i64 ptrtoint (i8* @test.ReadError.OUT_OF_MEMORY to i64), i64* %error_var, align 8 + store i64 ptrtoint (i8* @"test_ReadError$OUT_OF_MEMORY" to i64), i64* %error_var, align 8 br label %guard_block if.exit20: ; preds = %if.then15 @@ -408,7 +410,7 @@ if.exit21: ; preds = %if.exit9 %lo25 = load i8*, i8** %48, align 8 %49 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %47, i32 0, i32 1 %hi26 = load i64, i64* %49, align 8 - %50 = call i8 @test.contains(i8* %lo22, i64 %hi23, i8* %lo25, i64 %hi26) + %50 = call i8 @test_contains(i8* %lo22, i64 %hi23, i8* %lo25, i64 %hi26) %51 = trunc i8 %50 to i1 br i1 %51, label %if.then27, label %if.exit49 @@ -418,7 +420,7 @@ if.then27: ; preds = %if.exit21 store %"char[]"* null, %"char[]"** %53, align 8 %54 = getelementptr inbounds %Head, %Head* %literal32, i32 0, i32 0 store %"char[]" { i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i32 0, i32 0), i64 0 }, %"char[]"* %value34, align 8 - %55 = call i8* @"std::core::mem.alloc"(i64 16, i64 0) + %55 = call i8* @std_core_mem_alloc(i64 16, i64 0) %ptrptr36 = bitcast i8* %55 to %"char[]"* store %"char[]"* %ptrptr36, %"char[]"** %temp35, align 8 %56 = load %"char[]"*, %"char[]"** %temp35, align 8 @@ -426,7 +428,7 @@ if.then27: ; preds = %if.exit21 br i1 %not37, label %if.then38, label %if.exit39 if.then38: ; preds = %if.then27 - store i64 ptrtoint (i8* @test.ReadError.OUT_OF_MEMORY to i64), i64* %error_var33, align 8 + store i64 ptrtoint (i8* @"test_ReadError$OUT_OF_MEMORY" to i64), i64* %error_var33, align 8 br label %guard_block40 if.exit39: ; preds = %if.then27 @@ -445,7 +447,7 @@ noerr_block41: ; preds = %if.exit39 store %"char[]"* %61, %"char[]"** %54, align 8 %62 = load %Head, %Head* %literal32, align 8 store %Head %62, %Head* %value31, align 8 - %63 = call i8* @"std::core::mem.alloc"(i64 8, i64 0) + %63 = call i8* @std_core_mem_alloc(i64 8, i64 0) %ptrptr43 = bitcast i8* %63 to %Head* store %Head* %ptrptr43, %Head** %temp42, align 8 %64 = load %Head*, %Head** %temp42, align 8 @@ -453,7 +455,7 @@ noerr_block41: ; preds = %if.exit39 br i1 %not44, label %if.then45, label %if.exit46 if.then45: ; preds = %noerr_block41 - store i64 ptrtoint (i8* @test.ReadError.OUT_OF_MEMORY to i64), i64* %error_var30, align 8 + store i64 ptrtoint (i8* @"test_ReadError$OUT_OF_MEMORY" to i64), i64* %error_var30, align 8 br label %guard_block47 if.exit46: ; preds = %noerr_block41 @@ -486,14 +488,14 @@ if.exit49: ; preds = %if.exit21 %77 = load i32, i32* %len, align 4 %siuiext = sext i32 %77 to i64 %add = add i64 %siuiext, 1 - %78 = call i8* @"std::core::mem.alloc"(i64 %add, i64 0) + %78 = call i8* @std_core_mem_alloc(i64 %add, i64 0) store i8* %78, i8** %str, align 8 %79 = load i8*, i8** %str, align 8 %not50 = icmp eq i8* %79, null br i1 %not50, label %if.then51, label %if.exit52 if.then51: ; preds = %if.exit49 - ret i64 ptrtoint (i8* @test.ReadError.OUT_OF_MEMORY to i64) + ret i64 ptrtoint (i8* @"test_ReadError$OUT_OF_MEMORY" to i64) if.exit52: ; preds = %if.exit49 %80 = load i8*, i8** %str, align 8 @@ -520,7 +522,7 @@ if.exit52: ; preds = %if.exit49 %93 = insertvalue %"char[]" undef, i8* %ptroffset, 0 %94 = insertvalue %"char[]" %93, i64 %size, 1 store %"char[]" %94, %"char[]"* %value62, align 8 - %95 = call i8* @"std::core::mem.alloc"(i64 16, i64 0) + %95 = call i8* @std_core_mem_alloc(i64 16, i64 0) %ptrptr64 = bitcast i8* %95 to %"char[]"* store %"char[]"* %ptrptr64, %"char[]"** %temp63, align 8 %96 = load %"char[]"*, %"char[]"** %temp63, align 8 @@ -528,7 +530,7 @@ if.exit52: ; preds = %if.exit49 br i1 %not65, label %if.then66, label %if.exit67 if.then66: ; preds = %if.exit52 - store i64 ptrtoint (i8* @test.ReadError.OUT_OF_MEMORY to i64), i64* %error_var61, align 8 + store i64 ptrtoint (i8* @"test_ReadError$OUT_OF_MEMORY" to i64), i64* %error_var61, align 8 br label %guard_block68 if.exit67: ; preds = %if.exit52 @@ -547,7 +549,7 @@ noerr_block69: ; preds = %if.exit67 store %"char[]"* %101, %"char[]"** %89, align 8 %102 = load %Head, %Head* %literal60, align 8 store %Head %102, %Head* %value59, align 8 - %103 = call i8* @"std::core::mem.alloc"(i64 8, i64 0) + %103 = call i8* @std_core_mem_alloc(i64 8, i64 0) %ptrptr71 = bitcast i8* %103 to %Head* store %Head* %ptrptr71, %Head** %temp70, align 8 %104 = load %Head*, %Head** %temp70, align 8 @@ -555,7 +557,7 @@ noerr_block69: ; preds = %if.exit67 br i1 %not72, label %if.then73, label %if.exit74 if.then73: ; preds = %noerr_block69 - store i64 ptrtoint (i8* @test.ReadError.OUT_OF_MEMORY to i64), i64* %error_var58, align 8 + store i64 ptrtoint (i8* @"test_ReadError$OUT_OF_MEMORY" to i64), i64* %error_var58, align 8 br label %guard_block75 if.exit74: ; preds = %noerr_block69 @@ -579,7 +581,7 @@ noerr_block76: ; preds = %if.exit74 } ; Function Attrs: nounwind -define { %"char[]"*, i8 } @test.buildSummary(%Head* %0) #0 { +define { %"char[]"*, i8 } @test_buildSummary(%Head* %0) #0 { entry: %doc = alloca %Doc, align 8 %literal = alloca %Summary, align 8 @@ -621,7 +623,7 @@ cond.phi: ; preds = %cond.rhs, %cond.lhs } ; Function Attrs: nounwind -define { %"char[]"*, i8 } @test.readAndBuildSummary(i8* %0, i64 %1) #0 { +define { %"char[]"*, i8 } @test_readAndBuildSummary(i8* %0, i64 %1) #0 { entry: %url = alloca %"char[]", align 8 %retparam = alloca %Doc, align 8 @@ -639,14 +641,14 @@ entry: %lo = load i8*, i8** %5, align 8 %6 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %4, i32 0, i32 1 %hi = load i64, i64* %6, align 8 - %7 = call i64 @test.readDoc(%Doc* %retparam, i8* %lo, i64 %hi) + %7 = call i64 @test_readDoc(%Doc* %retparam, i8* %lo, i64 %hi) %not_err = icmp eq i64 %7, 0 br i1 %not_err, label %after.errcheck, label %else_block after.errcheck: ; preds = %entry %8 = getelementptr inbounds %Doc, %Doc* %retparam, i32 0, i32 0 %9 = load %Head*, %Head** %8, align 8 - %10 = call { %"char[]"*, i8 } @test.buildSummary(%Head* %9) + %10 = call { %"char[]"*, i8 } @test_buildSummary(%Head* %9) %11 = bitcast %Summary* %result to { %"char[]"*, i8 }* store { %"char[]"*, i8 } %10, { %"char[]"*, i8 }* %11, align 8 %12 = load %Summary, %Summary* %result, align 8 @@ -670,7 +672,8 @@ phi_block: ; preds = %else_block, %after. ret { %"char[]"*, i8 } %18 } -define i64 @test.isTitleNonEmpty(i8* %0, %Head* %1) #0 { +; Function Attrs: nounwind +define i64 @test_isTitleNonEmpty(i8* %0, %Head* %1) #0 { entry: %doc = alloca %Doc, align 8 %head = alloca %"char[]"*, align 8 @@ -683,7 +686,7 @@ entry: br i1 %not, label %if.then, label %if.exit if.then: ; preds = %entry - ret i64 ptrtoint (i8* @test.TitleResult.TITLE_MISSING to i64) + ret i64 ptrtoint (i8* @"test_TitleResult$TITLE_MISSING" to i64) if.exit: ; preds = %entry %5 = getelementptr inbounds %Doc, %Doc* %doc, i32 0, i32 0 @@ -696,7 +699,7 @@ if.exit: ; preds = %entry br i1 %not1, label %if.then2, label %if.exit3 if.then2: ; preds = %if.exit - ret i64 ptrtoint (i8* @test.TitleResult.TITLE_MISSING to i64) + ret i64 ptrtoint (i8* @"test_TitleResult$TITLE_MISSING" to i64) if.exit3: ; preds = %if.exit %10 = load %"char[]"*, %"char[]"** %head, align 8 @@ -709,7 +712,7 @@ if.exit3: ; preds = %if.exit } ; Function Attrs: nounwind -define i64 @test.readWhetherTitleNonEmpty(i8* %0, i8* %1, i64 %2) #0 { +define i64 @test_readWhetherTitleNonEmpty(i8* %0, i8* %1, i64 %2) #0 { entry: %url = alloca %"char[]", align 8 %reterr = alloca i64, align 8 @@ -725,7 +728,7 @@ entry: %lo = load i8*, i8** %6, align 8 %7 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %5, i32 0, i32 1 %hi = load i64, i64* %7, align 8 - %8 = call i64 @test.readDoc(%Doc* %retparam1, i8* %lo, i64 %hi) + %8 = call i64 @test_readDoc(%Doc* %retparam1, i8* %lo, i64 %hi) %not_err = icmp eq i64 %8, 0 br i1 %not_err, label %after.errcheck, label %error @@ -736,7 +739,7 @@ error: ; preds = %entry after.errcheck: ; preds = %entry %9 = getelementptr inbounds %Doc, %Doc* %retparam1, i32 0, i32 0 %10 = load %Head*, %Head** %9, align 8 - %11 = call i64 @test.isTitleNonEmpty(i8* %retparam, %Head* %10) + %11 = call i64 @test_isTitleNonEmpty(i8* %retparam, %Head* %10) %not_err2 = icmp eq i64 %11, 0 br i1 %not_err2, label %after.errcheck4, label %error3 @@ -754,7 +757,8 @@ err_retblock: ; preds = %error3, %error ret i64 %13 } -define i8* @test.bool_to_string(i8 zeroext %0) #0 { +; Function Attrs: nounwind +define i8* @test_bool_to_string(i8 zeroext %0) #0 { entry: %1 = trunc i8 %0 to i1 %ternary = select i1 %1, %"char[]" { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i32 0, i32 0), i64 4 }, %"char[]" { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i32 0, i32 0), i64 5 } @@ -763,7 +767,7 @@ entry: } ; Function Attrs: nounwind -define i8* @test.nameFromError(i64 %0) #0 { +define i8* @test_nameFromError(i64 %0) #0 { entry: %switch = alloca i64, align 8 store i64 %0, i64* %switch, align 8 @@ -771,21 +775,21 @@ entry: switch.entry: ; preds = %entry %1 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint (i8* @test.TitleResult.TITLE_MISSING to i64), %1 + %eq = icmp eq i64 ptrtoint (i8* @"test_TitleResult$TITLE_MISSING" to i64), %1 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i32 0, i32 0) next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint (i8* @test.ReadError.BAD_READ to i64), %1 + %eq1 = icmp eq i64 ptrtoint (i8* @"test_ReadError$BAD_READ" to i64), %1 br i1 %eq1, label %switch.case2, label %next_if3 switch.case2: ; preds = %next_if ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i32 0, i32 0) next_if3: ; preds = %next_if - %eq4 = icmp eq i64 ptrtoint (i8* @test.ReadError.OUT_OF_MEMORY to i64), %1 + %eq4 = icmp eq i64 ptrtoint (i8* @"test_ReadError$OUT_OF_MEMORY" to i64), %1 br i1 %eq4, label %switch.case5, label %next_if6 switch.case5: ; preds = %next_if3 @@ -798,7 +802,8 @@ switch.default: ; preds = %next_if6 ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i32 0, i32 0) } -define void @test.main() #0 { +; Function Attrs: nounwind +define void @test_main() #0 { entry: %URLS = alloca %"char[][]", align 8 %literal = alloca [5 x %"char[]"], align 16 @@ -860,7 +865,7 @@ loop.body: ; preds = %loop.cond %lo = load i8*, i8** %25, align 8 %26 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %24, i32 0, i32 1 %hi = load i64, i64* %26, align 8 - %27 = call { %"char[]"*, i8 } @test.readAndBuildSummary(i8* %lo, i64 %hi) + %27 = call { %"char[]"*, i8 } @test_readAndBuildSummary(i8* %lo, i64 %hi) %28 = bitcast %Summary* %result to { %"char[]"*, i8 }* store { %"char[]"*, i8 } %27, { %"char[]"*, i8 }* %28, align 8 %29 = bitcast %Summary* %summary to i8* @@ -868,7 +873,7 @@ loop.body: ; preds = %loop.cond call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %29, i8* align 8 %30, i32 16, i1 false) %31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i32 0, i32 0)) %32 = load i8*, i8** @__stdoutp, align 8 - call void @test.Summary__print(%Summary* %summary, i8* %32) + call void @test_Summary_print(%Summary* %summary, i8* %32) %33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i32 0, i32 0)) %34 = getelementptr inbounds %Summary, %Summary* %summary, i32 0, i32 0 %35 = load %"char[]"*, %"char[]"** %34, align 8 @@ -898,7 +903,7 @@ cond.phi: ; preds = %cond.rhs, %cond.lhs %lo4 = load i8*, i8** %45, align 8 %46 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %44, i32 0, i32 1 %hi5 = load i64, i64* %46, align 8 - %47 = call i64 @test.readWhetherTitleNonEmpty(i8* %retparam, i8* %lo4, i64 %hi5) + %47 = call i64 @test_readWhetherTitleNonEmpty(i8* %retparam, i8* %lo4, i64 %hi5) %not_err = icmp eq i64 %47, 0 br i1 %not_err, label %after.errcheck, label %error @@ -919,12 +924,12 @@ after_assign: ; preds = %after.errcheck, %er after_check: ; preds = %after_assign %50 = load i8, i8* %has_title, align 1 - %51 = call i8* @test.bool_to_string(i8 %50) + %51 = call i8* @test_bool_to_string(i8 %50) br label %phi_block else_block: ; preds = %after_assign %52 = load i64, i64* %has_title.f, align 8 - %53 = call i8* @test.nameFromError(i64 %52) + %53 = call i8* @test_nameFromError(i64 %52) br label %phi_block phi_block: ; preds = %else_block, %after_check diff --git a/test/test_suite/errors/failable_inits.c3t b/test/test_suite/errors/failable_inits.c3t index 5007d1e99..6c3effea1 100644 --- a/test/test_suite/errors/failable_inits.c3t +++ b/test/test_suite/errors/failable_inits.c3t @@ -33,14 +33,14 @@ fn void main() /* #expect: test.ll -define i64 @test.test1() #0 { +define i64 @test_test1() #0 { entry: %x = alloca %Bar, align 4 %x.f = alloca i64, align 8 %y = alloca %Bar, align 4 %error_var = alloca i64, align 8 %reterr = alloca i64, align 8 - store i64 ptrtoint (i8* @test.Foo.MY_VAL1 to i64), i64* %x.f, align 8 + store i64 ptrtoint (i8* @"test_Foo$MY_VAL1" to i64), i64* %x.f, align 8 %0 = load i64, i64* %x.f, align 8 %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after_check, label %error @@ -63,7 +63,8 @@ noerr_block: ; preds = %after_check ret i64 0 } -define i64 @test.test2() #0 { +; Function Attrs: nounwind +define i64 @test_test2() #0 { entry: %x = alloca %Bar, align 4 %x.f = alloca i64, align 8 @@ -96,9 +97,9 @@ noerr_block: ; preds = %after_check } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: - %0 = call i64 @test.test1() + %0 = call i64 @test_test1() %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %voiderr @@ -106,7 +107,7 @@ after.errcheck: ; preds = %entry br label %voiderr voiderr: ; preds = %after.errcheck, %entry - %1 = call i64 @test.test2() + %1 = call i64 @test_test2() %not_err1 = icmp eq i64 %1, 0 br i1 %not_err1, label %after.errcheck2, label %voiderr3 diff --git a/test/test_suite/errors/failable_taddr_and_access.c3t b/test/test_suite/errors/failable_taddr_and_access.c3t index 914739ced..41d674671 100644 --- a/test/test_suite/errors/failable_taddr_and_access.c3t +++ b/test/test_suite/errors/failable_taddr_and_access.c3t @@ -27,9 +27,9 @@ fn void main() %Foo = type { i32, i32 } -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@test.MyErr.FOO = linkonce constant i8 1, align 1 -@.typeid.test.MyErr = linkonce constant { i8, i64, [1 x i64] } { i8 9, i64 1, [1 x i64] [i64 ptrtoint (i8* @test.MyErr.FOO to i64)] }, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"test_MyErr$FOO" = linkonce constant i8 1, align 1 +@"ct$test_MyErr" = linkonce constant %.introspect { i8 9, i64 8, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [17 x i8] c"Not visible: %d\0A\00", align 1 @@ -37,7 +37,7 @@ fn void main() declare i32 @printf(i8*, ...) #0 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %z = alloca i32, align 4 %z.f = alloca i64, align 8 @@ -78,7 +78,7 @@ after_check2: ; preds = %after_assign br label %voiderr voiderr: ; preds = %after_check2, %after_assign - store i64 ptrtoint (i8* @test.MyErr.FOO to i64), i64* %z.f, align 8 + store i64 ptrtoint (i8* @"test_MyErr$FOO" to i64), i64* %z.f, align 8 br label %voiderr3 voiderr3: ; preds = %voiderr diff --git a/test/test_suite/errors/general_error_regression.c3t b/test/test_suite/errors/general_error_regression.c3t index bb77c7bec..d9fa1d86a 100644 --- a/test/test_suite/errors/general_error_regression.c3t +++ b/test/test_suite/errors/general_error_regression.c3t @@ -72,25 +72,25 @@ fn void main() /* #expect: foo.ll -define void @foo.Foo__hello(i64* %0) #0 { +define void @foo_Foo_hello(i64* %0) #0 { entry: - %1 = call i32 @"std::io.println"(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i32 0, i32 0)) #1 + %1 = call i32 @std_io_println(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i32 0, i32 0)) #1 ret void } -define void @foo.Bar__hello(i32* %0) #0 { +define void @foo_Bar_hello(i32* %0) #0 { entry: - %1 = call i32 @"std::io.println"(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i32 0, i32 0)) #1 + %1 = call i32 @std_io_println(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i32 0, i32 0)) #1 ret void } -define void @foo.MyEnum__hello(i32* %0) #0 { +define void @foo_MyEnum_hello(i32* %0) #0 { entry: - %1 = call i32 @"std::io.println"(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i32 0, i32 0)) #1 + %1 = call i32 @std_io_println(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i32 0, i32 0)) #1 ret void } -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %f = alloca i64, align 8 %ef = alloca i64, align 8 @@ -98,8 +98,8 @@ entry: %z = alloca i64, align 8 %b = alloca i32, align 4 %a = alloca i32, align 4 - store i64 ptrtoint (i8* @foo.Foo.X to i64), i64* %f, align 8 - store i64 ptrtoint (i8* @foo.Foo.Y to i64), i64* %ef, align 8 + store i64 ptrtoint (i8* @"foo_Foo$X" to i64), i64* %f, align 8 + store i64 ptrtoint (i8* @"foo_Foo$Y" to i64), i64* %ef, align 8 %0 = load i64, i64* %f, align 8 store i64 %0, i64* %x, align 8 %1 = load i64, i64* %x, align 8 @@ -112,30 +112,30 @@ entry: store i64 %5, i64* %z, align 8 %6 = load i64, i64* %z, align 8 %7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i64 %6) - store i64 ptrtoint (i8* @foo.Foo.W to i64), i64* %x, align 8 + store i64 ptrtoint (i8* @"foo_Foo$W" to i64), i64* %x, align 8 %8 = load i64, i64* %x, align 8 store i64 %8, i64* %z, align 8 %9 = load i64, i64* %z, align 8 %10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0), i64 %9) - store i64 ptrtoint (i8* @foo.Foo.W1 to i64), i64* %x, align 8 + store i64 ptrtoint (i8* @"foo_Foo$W1" to i64), i64* %x, align 8 %11 = load i64, i64* %x, align 8 store i64 %11, i64* %z, align 8 %12 = load i64, i64* %z, align 8 %13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i64 %12) - store i64 ptrtoint (i8* @foo.Foob.X1 to i64), i64* %x, align 8 + store i64 ptrtoint (i8* @"foo_Foob$X1" to i64), i64* %x, align 8 %14 = load i64, i64* %x, align 8 store i64 %14, i64* %z, align 8 %15 = load i64, i64* %z, align 8 %16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i64 %15) - store i64 ptrtoint (i8* @foo.Foob.Y2 to i64), i64* %x, align 8 + store i64 ptrtoint (i8* @"foo_Foob$Y2" to i64), i64* %x, align 8 %17 = load i64, i64* %x, align 8 store i64 %17, i64* %z, align 8 %18 = load i64, i64* %z, align 8 %19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i64 %18) store i32 0, i32* %b, align 4 store i32 0, i32* %a, align 4 - call void @foo.Foo__hello(i64* %f) - call void @foo.Bar__hello(i32* %b) - call void @foo.MyEnum__hello(i32* %a) + call void @foo_Foo_hello(i64* %f) + call void @foo_Bar_hello(i32* %b) + call void @foo_MyEnum_hello(i32* %a) ret void } \ No newline at end of file diff --git a/test/test_suite/errors/macro_err.c3t b/test/test_suite/errors/macro_err.c3t index da5c55752..04be99823 100644 --- a/test/test_suite/errors/macro_err.c3t +++ b/test/test_suite/errors/macro_err.c3t @@ -18,7 +18,7 @@ fn void main() /* #expect: test.ll -define i64 @test.abc(i32* %0) #0 { +define i64 @test_abc(i32* %0) #0 { entry: %reterr = alloca i64, align 8 store i32 1, i32* %0, align 4 @@ -26,11 +26,11 @@ entry: } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %error_var = alloca i64, align 8 %retparam = alloca i32, align 4 - %0 = call i64 @test.abc(i32* %retparam) + %0 = call i64 @test_abc(i32* %retparam) %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %error diff --git a/test/test_suite/errors/macro_err2.c3t b/test/test_suite/errors/macro_err2.c3t index 0fb55c288..52ed835f3 100644 --- a/test/test_suite/errors/macro_err2.c3t +++ b/test/test_suite/errors/macro_err2.c3t @@ -21,16 +21,16 @@ fn void main() /* #expect: test.ll -define i64 @test.abc(i32* %0) #0 { +define i64 @test_abc(i32* %0) #0 { entry: - ret i64 ptrtoint (i8* @test.Tester.FOO to i64) + ret i64 ptrtoint (i8* @"test_Tester$FOO" to i64) } -define void @test.main() #0 { +define void @test_main() #0 { entry: %blockret = alloca i32, align 4 %retparam = alloca i32, align 4 - %0 = call i64 @test.abc(i32* %retparam) + %0 = call i64 @test_abc(i32* %retparam) %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %opt_block_cleanup diff --git a/test/test_suite/errors/macro_err3.c3t b/test/test_suite/errors/macro_err3.c3t index 06026fcd6..590aebdde 100644 --- a/test/test_suite/errors/macro_err3.c3t +++ b/test/test_suite/errors/macro_err3.c3t @@ -18,7 +18,7 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %blockret = alloca i32, align 4 br label %opt_block_cleanup diff --git a/test/test_suite/errors/or_err_bool.c3t b/test/test_suite/errors/or_err_bool.c3t index 50e731c2c..29fccd1ee 100644 --- a/test/test_suite/errors/or_err_bool.c3t +++ b/test/test_suite/errors/or_err_bool.c3t @@ -10,7 +10,7 @@ fn void tester() /* #expect: test.ll -define void @test.tester() #0 { +define void @test_tester() #0 { entry: %x = alloca i8, align 1 %x.f = alloca i64, align 8 diff --git a/test/test_suite/errors/rethrow_mingw.c3t b/test/test_suite/errors/rethrow_mingw.c3t index 43aa6a24f..8069380d5 100644 --- a/test/test_suite/errors/rethrow_mingw.c3t +++ b/test/test_suite/errors/rethrow_mingw.c3t @@ -10,7 +10,7 @@ fn void! test() // #expect: rethrow.ll -define i64 @rethrow.test() #0 { +define i64 @rethrow_test() #0 { entry: %i = alloca i32, align 4 %i.f = alloca i64, align 8 diff --git a/test/test_suite/errors/simple_static_failable.c3t b/test/test_suite/errors/simple_static_failable.c3t index 453c1c024..5f3ebf6b2 100644 --- a/test/test_suite/errors/simple_static_failable.c3t +++ b/test/test_suite/errors/simple_static_failable.c3t @@ -15,10 +15,10 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 %i.f = alloca i64, align 8 - store i64 ptrtoint (i8* @foo.Blurg.Y to i64), i64* %i.f, align 8 + store i64 ptrtoint (i8* @"foo_Blurg$Y" to i64), i64* %i.f, align 8 ret void } \ No newline at end of file diff --git a/test/test_suite/errors/try_assign.c3t b/test/test_suite/errors/try_assign.c3t index fb2008e5f..1c42301ee 100644 --- a/test/test_suite/errors/try_assign.c3t +++ b/test/test_suite/errors/try_assign.c3t @@ -27,7 +27,7 @@ fn void main() // #expect: try_assign.ll -define void @try_assign.main() #0 { +define void @try_assign_main() #0 { entry: %x = alloca i32, align 4 %z = alloca i32, align 4 diff --git a/test/test_suite/errors/try_catch_if.c3t b/test/test_suite/errors/try_catch_if.c3t index 3fea20b75..d6e251204 100644 --- a/test/test_suite/errors/try_catch_if.c3t +++ b/test/test_suite/errors/try_catch_if.c3t @@ -36,7 +36,7 @@ fn void main() // #expect: try_catch_if.ll -define i64 @try_catch_if.tester(i32* %0) #0 { +define i64 @try_catch_if_tester(i32* %0) #0 { entry: %reterr = alloca i64, align 8 %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0)) @@ -44,7 +44,7 @@ entry: ret i64 0 } -define void @try_catch_if.test1() #0 { +define void @try_catch_if_test1() #0 { entry: %a = alloca i32, align 4 %a.f = alloca i64, align 8 @@ -67,7 +67,7 @@ after_check: ; preds = %testblock br label %testblock1 testblock1: ; preds = %after_check - %1 = call i64 @try_catch_if.tester(i32* %retparam) + %1 = call i64 @try_catch_if_tester(i32* %retparam) %not_err2 = icmp eq i64 %1, 0 br i1 %not_err2, label %after.errcheck, label %error3 diff --git a/test/test_suite/errors/try_unwrap_using_assert.c3t b/test/test_suite/errors/try_unwrap_using_assert.c3t index 06a251874..9ee8d82c2 100644 --- a/test/test_suite/errors/try_unwrap_using_assert.c3t +++ b/test/test_suite/errors/try_unwrap_using_assert.c3t @@ -13,7 +13,7 @@ fn int tester(int n) // #expect: test.ll -define i32 @test.tester(i32 %0) #0 { +define i32 @test_tester(i32 %0) #0 { entry: %num = alloca i32, align 4 %num.f = alloca i64, align 8 diff --git a/test/test_suite/errors/try_with_chained_unwrap.c3t b/test/test_suite/errors/try_with_chained_unwrap.c3t index 73cb2b4c3..007c96df5 100644 --- a/test/test_suite/errors/try_with_chained_unwrap.c3t +++ b/test/test_suite/errors/try_with_chained_unwrap.c3t @@ -18,7 +18,7 @@ fn void main() // #expect: try_with_chained_unwrap.ll -define void @try_with_chained_unwrap.main() #0 { +define void @try_with_chained_unwrap_main() #0 { entry: %val = alloca i32, align 4 %retparam = alloca i32, align 4 diff --git a/test/test_suite/errors/try_with_unwrap.c3t b/test/test_suite/errors/try_with_unwrap.c3t index 3b18cbb13..00f764384 100644 --- a/test/test_suite/errors/try_with_unwrap.c3t +++ b/test/test_suite/errors/try_with_unwrap.c3t @@ -21,7 +21,7 @@ fn void main() // #expect: try_with_unwrap.ll - define void @try_with_unwrap.main() #0 { + define void @try_with_unwrap_main() #0 { entry: %line = alloca i8*, align 8 %line.f = alloca i64, align 8 diff --git a/test/test_suite/errors/try_with_unwrapper.c3t b/test/test_suite/errors/try_with_unwrapper.c3t index e6d72a14d..5aae73521 100644 --- a/test/test_suite/errors/try_with_unwrapper.c3t +++ b/test/test_suite/errors/try_with_unwrapper.c3t @@ -44,7 +44,7 @@ fn void test2() ; Function Attrs: nounwind -define i32 @try_with_unwrapper.hello(i32 %0) #0 { +define i32 @try_with_unwrapper_hello(i32 %0) #0 { entry: %add = add i32 %0, 1 ret i32 %add @@ -54,7 +54,7 @@ entry: declare i32 @printf(i8*, ...) #0 ; Function Attrs: nounwind -define i64 @try_with_unwrapper.tester(i32* %0) #0 { +define i64 @try_with_unwrapper_tester(i32* %0) #0 { entry: %reterr = alloca i64, align 8 %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0)) @@ -63,7 +63,7 @@ entry: } ; Function Attrs: nounwind -define void @try_with_unwrapper.test1() #0 { +define void @try_with_unwrapper_test1() #0 { entry: %a = alloca i32, align 4 %a.f = alloca i64, align 8 @@ -91,7 +91,7 @@ phi_try_catch: ; preds = %catch_landing, %aft chain_next: ; preds = %phi_try_catch store i32 0, i32* %c, align 4 - %2 = call i64 @try_with_unwrapper.tester(i32* %retparam) + %2 = call i64 @try_with_unwrapper_tester(i32* %retparam) %not_err1 = icmp eq i64 %2, 0 br i1 %not_err1, label %after.errcheck, label %catch_landing2 @@ -119,7 +119,7 @@ end_chain: ; preds = %fail_chain, %chain_ if.then: ; preds = %end_chain %4 = load i32, i32* %b, align 4 - %5 = call i32 @try_with_unwrapper.hello(i32 %4) + %5 = call i32 @try_with_unwrapper_hello(i32 %4) %6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i32 %5) %7 = load i32, i32* %c, align 4 %8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i32 %7) @@ -131,7 +131,7 @@ if.exit: ; preds = %if.then, %end_chain ; Function Attrs: nounwind -define void @try_with_unwrapper.test2() #0 { +define void @try_with_unwrapper_test2() #0 { entry: %a = alloca i32, align 4 %a.f = alloca i64, align 8 @@ -157,7 +157,7 @@ phi_try_catch: ; preds = %catch_landing, %aft chain_next: ; preds = %phi_try_catch %2 = load i32, i32* %b, align 4 - %3 = call i32 @try_with_unwrapper.hello(i32 %2) + %3 = call i32 @try_with_unwrapper_hello(i32 %2) %intbool = icmp ne i32 %3, 0 br i1 %intbool, label %chain_next1, label %fail_chain @@ -174,7 +174,7 @@ end_chain: ; preds = %fail_chain, %chain_ if.then: ; preds = %end_chain %4 = load i32, i32* %b, align 4 %add = add i32 %4, 1 - %5 = call i32 @try_with_unwrapper.hello(i32 %add) + %5 = call i32 @try_with_unwrapper_hello(i32 %add) br label %if.exit if.exit: ; preds = %if.then, %end_chain diff --git a/test/test_suite/expressions/addr_compiles.c3t b/test/test_suite/expressions/addr_compiles.c3t index 57bd8afcf..beb4f6d04 100644 --- a/test/test_suite/expressions/addr_compiles.c3t +++ b/test/test_suite/expressions/addr_compiles.c3t @@ -49,16 +49,16 @@ fn void test3() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: - call void @test.test() - call void @test.test2() - call void @test.test3() + call void @test_test() + call void @test_test2() + call void @test_test3() ret void } ; Function Attrs: nounwind -define void @test.test() #0 { +define void @test_test() #0 { entry: %f = alloca i32, align 4 %x = alloca i32*, align 8 @@ -80,10 +80,10 @@ entry: } ; Function Attrs: nounwind -define void @test.test2() #0 { +define void @test_test2() #0 { entry: %w = alloca i32*, align 8 - store i32* @test.XX, i32** %w, align 8 + store i32* @test_XX, i32** %w, align 8 %0 = load i32*, i32** %w, align 8 %1 = load i32, i32* %0, align 8 call void (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i32 0, i32 0), i32 %1) @@ -91,7 +91,7 @@ entry: } ; Function Attrs: nounwind -define void @test.test3() #0 { +define void @test_test3() #0 { entry: %h = alloca %Foo, align 4 %zx = alloca i32*, align 8 diff --git a/test/test_suite/expressions/call_inline.c3t b/test/test_suite/expressions/call_inline.c3t index 57c0df0fe..b37a192b0 100644 --- a/test/test_suite/expressions/call_inline.c3t +++ b/test/test_suite/expressions/call_inline.c3t @@ -31,15 +31,15 @@ fn void main() // #expect: inlineme.ll entry: - call void @inlineme.test1() #2 - call void @inlineme.test2() #2 - call void @inlineme.test3() #2 - call void @inlineme.test1() #3 - call void @inlineme.test2() #3 - call void @inlineme.test3() #3 - call void @inlineme.test1() #2 - call void @inlineme.test2() - call void @inlineme.test3() + call void @inlineme_test1() #2 + call void @inlineme_test2() #2 + call void @inlineme_test3() #2 + call void @inlineme_test1() #3 + call void @inlineme_test2() #3 + call void @inlineme_test3() #3 + call void @inlineme_test1() #2 + call void @inlineme_test2() + call void @inlineme_test3() ret void } diff --git a/test/test_suite/expressions/chained_conditional.c3t b/test/test_suite/expressions/chained_conditional.c3t index 2b7638cd0..79859afd7 100644 --- a/test/test_suite/expressions/chained_conditional.c3t +++ b/test/test_suite/expressions/chained_conditional.c3t @@ -26,11 +26,11 @@ entry: %x = alloca i32, align 4 %y = alloca i32, align 4 %z = alloca i32, align 4 - %0 = call i32 @chained.foo() + %0 = call i32 @chained_foo() store i32 %0, i32* %x, align 4 - %1 = call i32 @chained.foo() + %1 = call i32 @chained_foo() store i32 %1, i32* %y, align 4 - %2 = call i32 @chained.foo() + %2 = call i32 @chained_foo() store i32 %2, i32* %z, align 4 %3 = load i32, i32* %x, align 4 %gt = icmp sgt i32 %3, 0 @@ -55,7 +55,7 @@ and.phi4: br i1 %val5, label %if.then, label %if.else if.then: - %6 = call i32 @chained.foo() + %6 = call i32 @chained_foo() br label %if.exit if.else: diff --git a/test/test_suite/expressions/elvis.c3t b/test/test_suite/expressions/elvis.c3t index 99b643af1..f5c2b52ce 100644 --- a/test/test_suite/expressions/elvis.c3t +++ b/test/test_suite/expressions/elvis.c3t @@ -17,7 +17,7 @@ fn bool elvis3(bool x, bool y) // #expect: elvis.ll -define i32* @elvis.elvis(i32* %0, i32* %1) #0 { +define i32* @elvis_elvis(i32* %0, i32* %1) #0 { entry: %ptrbool = icmp ne i32* %0, null br i1 %ptrbool, label %cond.phi, label %cond.rhs @@ -30,7 +30,7 @@ cond.phi: ; preds = %cond.rhs, %entry ret i32* %val } -define i32* @elvis.elvis2(i32* %0, i32* %1) #0 { +define i32* @elvis_elvis2(i32* %0, i32* %1) #0 { entry: %ptrbool = icmp ne i32* %0, null br i1 %ptrbool, label %cond.phi3, label %cond.rhs @@ -51,7 +51,7 @@ cond.phi3: ; preds = %cond.phi, %entry ret i32* %val4 } -define zeroext i8 @elvis.elvis3(i8 zeroext %0, i8 zeroext %1) #0 { +define zeroext i8 @elvis_elvis3(i8 zeroext %0, i8 zeroext %1) #0 { entry: %2 = trunc i8 %0 to i1 br i1 %2, label %cond.phi, label %cond.rhs diff --git a/test/test_suite/expressions/folding_ptr.c3t b/test/test_suite/expressions/folding_ptr.c3t index 9c891054d..51581256a 100644 --- a/test/test_suite/expressions/folding_ptr.c3t +++ b/test/test_suite/expressions/folding_ptr.c3t @@ -16,7 +16,7 @@ fn int f() /* #expect: test.ll -define i32 @test.f() #0 { +define i32 @test_f() #0 { entry: %0 = load %Test*, %Test** @cfun, align 8 %ptroffset = getelementptr %Test, %Test* %0, i64 0 diff --git a/test/test_suite/expressions/parsed_numbers.c3t b/test/test_suite/expressions/parsed_numbers.c3t index ce2809a64..cb4e46d16 100644 --- a/test/test_suite/expressions/parsed_numbers.c3t +++ b/test/test_suite/expressions/parsed_numbers.c3t @@ -7,7 +7,7 @@ double d = 12.3e+12; // #expect: numbers.ll -@numbers.a = local_unnamed_addr global double 2.125000e+00, align 8 -@numbers.b = local_unnamed_addr global double -1.230000e-11, align 8 -@numbers.c = local_unnamed_addr global double 5.312500e-01, align 8 -@numbers.d = local_unnamed_addr global double 1.230000e+13, align 8 \ No newline at end of file +@numbers_a = local_unnamed_addr global double 2.125000e+00, align 8 +@numbers_b = local_unnamed_addr global double -1.230000e-11, align 8 +@numbers_c = local_unnamed_addr global double 5.312500e-01, align 8 +@numbers_d = local_unnamed_addr global double 1.230000e+13, align 8 \ No newline at end of file diff --git a/test/test_suite/expressions/pointer_access.c3t b/test/test_suite/expressions/pointer_access.c3t index 2188586e0..a3aa585fe 100644 --- a/test/test_suite/expressions/pointer_access.c3t +++ b/test/test_suite/expressions/pointer_access.c3t @@ -42,13 +42,13 @@ fn void testSimple() %anon = type { i32, i32 } %anon.0 = type { double } -@.typeid.pointer_access.c = linkonce constant { i8, i64 } { i8 10, i64 5 }, align 8 -@.typeid.pointer_access.anon = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@.typeid.pointer_access.anon.1 = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.pointer_access.ExtraSimple = linkonce constant { i8, i64 } { i8 10, i64 6 }, align 8 +@"ct$pointer_access_c" = linkonce constant %.introspect { i8 10, i64 40, i64 0, i64 5, [0 x i64] zeroinitializer }, align 8 +@"ct$pointer_access_anon" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$pointer_access_anon.4" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$pointer_access_ExtraSimple" = linkonce constant %.introspect { i8 10, i64 72, i64 0, i64 6, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [71 x i8] c"a = %d, c.e = %f, c.f = %f, c.j = %f, g = %d, o0 = %f, r = %d, s = %d\0A\00", align 1 -define void @pointer_access.testSimple() #0 { +define void @pointer_access_testSimple() #0 { entry: %a = alloca %ExtraSimple, align 8 %0 = getelementptr inbounds %ExtraSimple, %ExtraSimple* %a, i32 0, i32 0 diff --git a/test/test_suite/expressions/simple_float_sub_neg.c3t b/test/test_suite/expressions/simple_float_sub_neg.c3t index 79cb304ab..73d01cbd0 100644 --- a/test/test_suite/expressions/simple_float_sub_neg.c3t +++ b/test/test_suite/expressions/simple_float_sub_neg.c3t @@ -7,7 +7,7 @@ fn double test(double a, double b, double c, double d) // #expect: simple_float_sub_neg.ll -define double @simple_float_sub_neg.test(double %0, double %1, double %2, double %3) #0 { +define double @simple_float_sub_neg_test(double %0, double %1, double %2, double %3) #0 { entry: %fsub = fsub double %0, %1 %fneg = fneg double %fsub diff --git a/test/test_suite/expressions/ternary_bool.c3t b/test/test_suite/expressions/ternary_bool.c3t index 583d5d9e2..b50047abe 100644 --- a/test/test_suite/expressions/ternary_bool.c3t +++ b/test/test_suite/expressions/ternary_bool.c3t @@ -15,7 +15,7 @@ fn void main() // #expect: ternary_bool.ll -define void @ternary_bool.main() #0 { +define void @ternary_bool_main() #0 { entry: %b = alloca i8, align 1 %c = alloca i8*, align 8 diff --git a/test/test_suite/failable_catch.c3t b/test/test_suite/failable_catch.c3t index f99a05af1..edf2f26cd 100644 --- a/test/test_suite/failable_catch.c3t +++ b/test/test_suite/failable_catch.c3t @@ -55,7 +55,7 @@ if.then: ; preds = %entry br label %expr_block.exit if.exit: ; preds = %entry - store i64 ptrtoint (i8* @failable_catch.MyErr.TEST to i64), i64* %a.f, align 8 + store i64 ptrtoint (i8* @"failable_catch_MyErr$TEST" to i64), i64* %a.f, align 8 br label %after_assign expr_block.exit: ; preds = %if.then @@ -90,7 +90,7 @@ if.then4: ; preds = %phi_block br label %expr_block.exit6 if.exit5: ; preds = %phi_block - store i64 ptrtoint (i8* @failable_catch.MyErr.TEST to i64), i64* %b.f, align 8 + store i64 ptrtoint (i8* @"failable_catch_MyErr$TEST" to i64), i64* %b.f, align 8 br label %after_assign7 expr_block.exit6: ; preds = %if.then4 @@ -111,7 +111,7 @@ if.then11: ; preds = %after_assign7 br label %expr_block.exit13 if.exit12: ; preds = %after_assign7 - store i64 ptrtoint (i8* @failable_catch.MyErr.TEST to i64), i64* %c.f, align 8 + store i64 ptrtoint (i8* @"failable_catch_MyErr$TEST" to i64), i64* %c.f, align 8 br label %after_assign14 expr_block.exit13: ; preds = %if.then11 diff --git a/test/test_suite/floats/convert_float.c3t b/test/test_suite/floats/convert_float.c3t index cda573226..dfe0fdd62 100644 --- a/test/test_suite/floats/convert_float.c3t +++ b/test/test_suite/floats/convert_float.c3t @@ -9,7 +9,7 @@ fn void test() } /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %x = alloca float, align 4 %y = alloca double, align 8 diff --git a/test/test_suite/from_docs/examples_defer.c3t b/test/test_suite/from_docs/examples_defer.c3t index 999b5b380..31e7136ce 100644 --- a/test/test_suite/from_docs/examples_defer.c3t +++ b/test/test_suite/from_docs/examples_defer.c3t @@ -23,14 +23,14 @@ fn void main() /* #expect: defer1.ll -define void @defer1.test(i32 %0) #0 { +define void @defer1_test(i32 %0) #0 { entry: %eq = icmp eq i32 %0, 1 br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %entry - %1 = call i32 @"std::io.print"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0)) - %2 = call i32 @"std::io.println"(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i32 0, i32 0)) #1 + %1 = call i32 @std_io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0)) + %2 = call i32 @std_io_println(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i32 0, i32 0)) #1 ret void if.exit: ; preds = %entry @@ -38,24 +38,24 @@ if.exit: ; preds = %entry br i1 %eq1, label %if.then2, label %if.exit3 if.then2: ; preds = %if.exit - %3 = call i32 @"std::io.print"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0)) - %4 = call i32 @"std::io.print"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i32 0, i32 0)) - %5 = call i32 @"std::io.println"(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i32 0, i32 0)) #1 + %3 = call i32 @std_io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0)) + %4 = call i32 @std_io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i32 0, i32 0)) + %5 = call i32 @std_io_println(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i32 0, i32 0)) #1 ret void if.exit3: ; preds = %if.exit - %6 = call i32 @"std::io.print"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0)) - %7 = call i32 @"std::io.print"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0)) - %8 = call i32 @"std::io.print"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0)) - %9 = call i32 @"std::io.println"(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i32 0, i32 0)) #1 + %6 = call i32 @std_io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0)) + %7 = call i32 @std_io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0)) + %8 = call i32 @std_io_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0)) + %9 = call i32 @std_io_println(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.8, i32 0, i32 0)) #1 ret void } ; Function Attrs: nounwind -define void @defer1.main() #0 { +define void @defer1_main() #0 { entry: - call void @defer1.test(i32 1) - call void @defer1.test(i32 0) - call void @defer1.test(i32 10) + call void @defer1_test(i32 1) + call void @defer1_test(i32 0) + call void @defer1_test(i32 10) ret void -} +} \ No newline at end of file diff --git a/test/test_suite/from_docs/examples_forswitch.c3t b/test/test_suite/from_docs/examples_forswitch.c3t index c6f292503..d1b175361 100644 --- a/test/test_suite/from_docs/examples_forswitch.c3t +++ b/test/test_suite/from_docs/examples_forswitch.c3t @@ -89,8 +89,7 @@ fn void demo_enum(Height h) } /* #expect: examples.ll - -define void @examples.example_for() #0 { +define void @examples_example_for() #0 { entry: %i = alloca i32, align 4 store i32 0, i32* %i, align 4 @@ -110,7 +109,7 @@ loop.body: ; preds = %loop.cond br label %loop.cond loop.exit: ; preds = %loop.cond - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.zstr, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.zstr.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.zstr.2, i64 0, i64 0), i32 14) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.zstr, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.zstr.1, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.zstr.2, i64 0, i64 0), i32 14) unreachable unreachable_block: ; No predecessors! @@ -118,7 +117,7 @@ unreachable_block: ; No predecessors! } ; Function Attrs: nounwind -define void @examples.demo_enum(i32 %0) #0 { +define void @examples_demo_enum(i32 %0) #0 { entry: %switch = alloca i32, align 4 %switch2 = alloca i32, align 4 @@ -139,11 +138,11 @@ switch.entry: ; preds = %entry ] switch.case: ; preds = %switch.entry, %switch.entry - %2 = call i32 @"std::io.println"(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0)) #1 + %2 = call i32 @std_io_println(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0)) #1 br label %switch.exit switch.case1: ; preds = %switch.entry - %3 = call i32 @"std::io.println"(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0)) #1 + %3 = call i32 @std_io_println(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0)) #1 br label %switch.exit switch.exit: ; preds = %switch.case1, %switch.case, %switch.entry @@ -159,11 +158,11 @@ switch.entry3: ; preds = %switch.exit ] switch.case4: ; preds = %switch.entry3, %switch.entry3 - %5 = call i32 @"std::io.println"(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0)) #1 + %5 = call i32 @std_io_println(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i32 0, i32 0)) #1 br label %switch.exit6 switch.case5: ; preds = %switch.entry3 - %6 = call i32 @"std::io.println"(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0)) #1 + %6 = call i32 @std_io_println(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0)) #1 br label %switch.exit6 switch.exit6: ; preds = %switch.case5, %switch.case4, %switch.entry3 @@ -182,7 +181,7 @@ switch.case9: ; preds = %switch.entry8 br label %switch.exit12 switch.case10: ; preds = %switch.entry8 - %8 = call i32 @"std::io.println"(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0)) #1 + %8 = call i32 @std_io_println(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0)) #1 br label %switch.exit12 switch.case11: ; preds = %switch.entry8 @@ -220,18 +219,18 @@ switch.entry18: ; preds = %switch.exit16 switch.case19: ; preds = %switch.entry18 store i32 1, i32* %a, align 4 - %11 = call i32 @"std::io.println"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0)) #1 + %11 = call i32 @std_io_println(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0)) #1 br label %switch.case20 switch.case20: ; preds = %switch.entry18, %switch.case19 store i32 2, i32* %a21, align 4 - %12 = call i32 @"std::io.println"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0)) #1 + %12 = call i32 @std_io_println(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0)) #1 br label %switch.case22 switch.case22: ; preds = %switch.entry18, %switch.case20 - %13 = call i32 @"std::io.println"(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i32 0, i32 0)) #1 + %13 = call i32 @std_io_println(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i32 0, i32 0)) #1 br label %switch.exit23 switch.exit23: ; preds = %switch.case22, %switch.entry18 ret void -} \ No newline at end of file +} diff --git a/test/test_suite/from_docs/examples_functionpointer.c3t b/test/test_suite/from_docs/examples_functionpointer.c3t index 3bf9fd0ff..81e152e89 100644 --- a/test/test_suite/from_docs/examples_functionpointer.c3t +++ b/test/test_suite/from_docs/examples_functionpointer.c3t @@ -18,15 +18,15 @@ fn void main() // #expect: demo.ll -define i32 @demo.my_callback(i8* %0, i32 %1) #0 { +define i32 @demo_my_callback(i8* %0, i32 %1) #0 { entry: ret i32 0 } -define void @demo.main() #0 { +define void @demo_main() #0 { entry: %result = alloca i32, align 4 - %0 = load i32 (i8*, i32)*, i32 (i8*, i32)** @demo.cb, align 8 + %0 = load i32 (i8*, i32)*, i32 (i8*, i32)** @demo_cb, align 8 %1 = call i32 %0(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i32 123) store i32 %1, i32* %result, align 4 ret void diff --git a/test/test_suite/from_docs/examples_if_catch.c3t b/test/test_suite/from_docs/examples_if_catch.c3t index b89e06c48..e9aaf4802 100644 --- a/test/test_suite/from_docs/examples_if_catch.c3t +++ b/test/test_suite/from_docs/examples_if_catch.c3t @@ -47,14 +47,14 @@ fn void main() /* #expect: demo.ll -define i64 @demo.divide(double* %0, i32 %1, i32 %2) #0 { +define i64 @demo_divide(double* %0, i32 %1, i32 %2) #0 { entry: %reterr = alloca i64, align 8 %eq = icmp eq i32 %2, 0 br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %entry - ret i64 ptrtoint (i8* @demo.MathError.DIVISION_BY_ZERO to i64) + ret i64 ptrtoint (i8* @"demo_MathError$DIVISION_BY_ZERO" to i64) if.exit: ; preds = %entry %sifp = sitofp i32 %1 to double @@ -64,14 +64,15 @@ if.exit: ; preds = %entry ret i64 0 } -define i64 @demo.testMayError() #0 { +; Function Attrs: nounwind +define i64 @demo_testMayError() #0 { entry: %error_var = alloca i64, align 8 %retparam = alloca double, align 8 %reterr = alloca i64, align 8 - %0 = call i32 @demo.foo() - %1 = call i32 @demo.bar() - %2 = call i64 @demo.divide(double* %retparam, i32 %0, i32 %1) + %0 = call i32 @demo_foo() + %1 = call i32 @demo_bar() + %2 = call i64 @demo_divide(double* %retparam, i32 %0, i32 %1) %not_err = icmp eq i64 %2, 0 br i1 %not_err, label %after.errcheck, label %error @@ -90,16 +91,17 @@ noerr_block: ; preds = %after.errcheck ret i64 0 } -define void @demo.main() #0 { +; Function Attrs: nounwind +define void @demo_main() #0 { entry: %ratio = alloca double, align 8 %ratio.f = alloca i64, align 8 %retparam = alloca double, align 8 %err = alloca i64, align 8 %switch = alloca i64, align 8 - %0 = call i32 @demo.foo() - %1 = call i32 @demo.bar() - %2 = call i64 @demo.divide(double* %retparam, i32 %0, i32 %1) + %0 = call i32 @demo_foo() + %1 = call i32 @demo_bar() + %2 = call i64 @demo_divide(double* %retparam, i32 %0, i32 %1) %not_err = icmp eq i64 %2, 0 br i1 %not_err, label %after.errcheck, label %error @@ -140,7 +142,7 @@ if.then: ; preds = %end_block switch.entry: ; preds = %if.then %6 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint (i8* @demo.MathError.DIVISION_BY_ZERO to i64), %6 + %eq = icmp eq i64 ptrtoint (i8* @"demo_MathError$DIVISION_BY_ZERO" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry diff --git a/test/test_suite/from_docs/examples_macro_function.c3t b/test/test_suite/from_docs/examples_macro_function.c3t index 6f5cb46f1..2e071cb37 100644 --- a/test/test_suite/from_docs/examples_macro_function.c3t +++ b/test/test_suite/from_docs/examples_macro_function.c3t @@ -23,13 +23,13 @@ fn int test() /* #expect: example.ll -define i32 @example.square(i32 %0) #0 { +define i32 @example_square(i32 %0) #0 { entry: %mul = mul i32 %0, %0 ret i32 %mul } -define i32 @example.test() #0 { +define i32 @example_test() #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 @@ -37,7 +37,7 @@ entry: %b2 = alloca i32, align 4 store i32 2, i32* %a, align 4 store i32 3, i32* %b, align 4 - store i32 (i32)* @example.square, i32 (i32)** %a1, align 8 + store i32 (i32)* @example_square, i32 (i32)** %a1, align 8 store i32 2, i32* %b2, align 4 %0 = load i32 (i32)*, i32 (i32)** %a1, align 8 %1 = load i32, i32* %b2, align 4 diff --git a/test/test_suite/functions/assorted_tests.c3t b/test/test_suite/functions/assorted_tests.c3t index ae15f105f..c5737579a 100644 --- a/test/test_suite/functions/assorted_tests.c3t +++ b/test/test_suite/functions/assorted_tests.c3t @@ -50,7 +50,7 @@ fn void denormalize(InternalFPF* ptr) // #expect: test.ll -define i32 @test.foo1() #0 { +define i32 @test_foo1() #0 { entry: %pp = alloca i8*, align 8 %w_cnt = alloca i32, align 4 @@ -64,7 +64,7 @@ entry: ret i32 %3 } -define void @test.foo2(i32 %0) #0 { +define void @test_foo2(i32 %0) #0 { entry: %intbool = icmp ne i32 %0, 0 %ternary = select i1 %intbool, double 1.000000e+00, double 1.250000e+01 @@ -72,7 +72,7 @@ entry: ret void } -define i32 @test.trys(i8* %0, i32 %1) #0 { +define i32 @test_trys(i8* %0, i32 %1) #0 { entry: %asa = alloca i32, align 4 %val = alloca double, align 8 @@ -95,15 +95,15 @@ if.exit: ; preds = %if.then, %entry ret i32 %add1 } -define void @test.setInternalFPFZero(%InternalFPF* %0) #1 { +define void @test_setInternalFPFZero(%InternalFPF* %0) #1 { entry: %1 = getelementptr inbounds %InternalFPF, %InternalFPF* %0, i32 0, i32 0 store i8 0, i8* %1, align 8 ret void } -define void @test.denormalize(%InternalFPF* %0) #0 { +define void @test_denormalize(%InternalFPF* %0) #0 { entry: - call void @test.setInternalFPFZero(%InternalFPF* %0) + call void @test_setInternalFPFZero(%InternalFPF* %0) ret void } diff --git a/test/test_suite/functions/naked_function.c3t b/test/test_suite/functions/naked_function.c3t index d5bde17d6..86580849e 100644 --- a/test/test_suite/functions/naked_function.c3t +++ b/test/test_suite/functions/naked_function.c3t @@ -7,7 +7,7 @@ fn void test(int i) @naked // #expect: naked_function.ll -define void @naked_function.test(i32 %0) #0 { +define void @naked_function_test(i32 %0) #0 { entry: ret void } diff --git a/test/test_suite/functions/returning_void.c3t b/test/test_suite/functions/returning_void.c3t index 567463bfe..887a270ae 100644 --- a/test/test_suite/functions/returning_void.c3t +++ b/test/test_suite/functions/returning_void.c3t @@ -16,5 +16,5 @@ if.then: ret void if.exit: - call void @returning_void.test1() + call void @returning_void_test1() ret void diff --git a/test/test_suite/functions/splat_aarch64.c3t b/test/test_suite/functions/splat_aarch64.c3t index a01ce111b..88f4b202d 100644 --- a/test/test_suite/functions/splat_aarch64.c3t +++ b/test/test_suite/functions/splat_aarch64.c3t @@ -19,7 +19,7 @@ fn void test() declare i32 @sum_us([2 x i64]) #0 -define void @splat.test() #0 { +define void @splat_test() #0 { entry: %vararg = alloca %"int[]", align 8 %varargslots = alloca [3 x i32], align 4 diff --git a/test/test_suite/functions/static_vars.c3t b/test/test_suite/functions/static_vars.c3t index 0d4e78da8..3c164b321 100644 --- a/test/test_suite/functions/static_vars.c3t +++ b/test/test_suite/functions/static_vars.c3t @@ -8,15 +8,16 @@ fn int test() return x; } -// #expect: foo.ll +/* #expect: foo.ll -@test.x = internal unnamed_addr global i32 1, align 4 -@test.y = internal thread_local(localdynamic) unnamed_addr global i32 2, align 4 +@"test$x" = internal unnamed_addr global i32 1, align 4 +@"test$y" = internal thread_local(localdynamic) unnamed_addr global i32 2, align 4 -define i32 @foo.test() - - %0 = load i32, i32* @test.x, align 4 +define i32 @foo_test() #0 { +entry: + %0 = load i32, i32* @"test$x", align 4 %add = add i32 %0, 1 - store i32 %add, i32* @test.x, align 4 - %1 = load i32, i32* @test.x, align 4 + store i32 %add, i32* @"test$x", align 4 + %1 = load i32, i32* @"test$x", align 4 ret i32 %1 +} diff --git a/test/test_suite/functions/test_regression.c3t b/test/test_suite/functions/test_regression.c3t index 257269c01..a89d1cb1a 100644 --- a/test/test_suite/functions/test_regression.c3t +++ b/test/test_suite/functions/test_regression.c3t @@ -244,14 +244,16 @@ fn Type getValue(Blob blob) %List = type { i64, i64, i32* } %Foo = type { i32, i32 } -@.typeid.test.Bobo = linkonce constant { i8, i64 } { i8 10, i64 6 }, align 8 -@.typeid.test.Blob = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@.typeid.test.Foor = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.test.Foo2 = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@.typeid.test.MyEnum = linkonce constant { i8, i64, i64 } { i8 8, i64 3, i64 0 }, align 8 +@"ct$test_Bobo" = linkonce constant %.introspect { i8 10, i64 20, i64 0, i64 6, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Blob" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foor" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foo2" = linkonce constant %.introspect { i8 10, i64 4, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$test_MyEnum" = linkonce constant %.introspect { i8 8, i64 4, i64 ptrtoint (%.introspect* @"ct$int" to i64), i64 3, [0 x i64] zeroinitializer }, align 8 +@"test_static$x" = internal unnamed_addr global i32 1, align 4 -define void @test.Foo2__printme(%Foo2* %0) #0 { +define void @test_Foo2_printme(%Foo2* %0) #0 { entry: %1 = getelementptr inbounds %Foo2, %Foo2* %0, i32 0, i32 0 %2 = load i32, i32* %1, align 8 @@ -260,7 +262,7 @@ entry: } ; Function Attrs: nounwind -define i32 @test.Foo2__mutate(%Foo2* %0) #0 { +define i32 @test_Foo2_mutate(%Foo2* %0) #0 { entry: %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i32 0, i32 0)) %2 = getelementptr inbounds %Foo2, %Foo2* %0, i32 0, i32 0 @@ -274,26 +276,26 @@ entry: declare i32 @printf(i8*, ...) #0 ; Function Attrs: nounwind -define void @test.helloWorld() #0 { +define void @test_helloWorld() #0 { entry: %0 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0)) ret void } ; Function Attrs: nounwind -define i32 @test.test_static() #0 { +define i32 @test_test_static() #0 { entry: - %0 = load i32, i32* @test_static.x, align 4 + %0 = load i32, i32* @"test_static$x", align 4 %add = add i32 %0, 1 - store i32 %add, i32* @test_static.x, align 4 - %1 = load i32, i32* @test_static.x, align 4 + store i32 %add, i32* @"test_static$x", align 4 + %1 = load i32, i32* @"test_static$x", align 4 %2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0), i32 %1) - %3 = load i32, i32* @test_static.x, align 4 + %3 = load i32, i32* @"test_static$x", align 4 ret i32 %3 } ; Function Attrs: nounwind -define i32 @test.helo(double %0, %Bobo* byval(%Bobo) align 8 %1) #0 { +define i32 @test_helo(double %0, %Bobo* byval(%Bobo) align 8 %1) #0 { entry: %b = alloca %Bobo, align 4 %de = alloca [3 x i32], align 4 @@ -310,12 +312,12 @@ entry: %7 = bitcast %Bobo* %indirectarg to i8* %8 = bitcast %Bobo* %c to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %7, i8* align 4 %8, i32 20, i1 false) - %9 = call i32 @test.helo(double 1.000000e+00, %Bobo* byval(%Bobo) align 8 %indirectarg) + %9 = call i32 @test_helo(double 1.000000e+00, %Bobo* byval(%Bobo) align 8 %indirectarg) ret i32 1 } ; Function Attrs: nounwind -define i32 @test.test1(i32 %0, i32 %1) #0 { +define i32 @test_test1(i32 %0, i32 %1) #0 { entry: %a = alloca i32, align 4 store i32 %0, i32* %a, align 4 @@ -335,7 +337,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sum_us(i8* %0, i64 %1) #0 { +define i32 @test_sum_us(i8* %0, i64 %1) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -378,7 +380,7 @@ if.exit: ; preds = %entry %lo = load i8*, i8** %19, align 8 %20 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %18, i32 0, i32 1 %hi = load i64, i64* %20, align 8 - %21 = call i32 @test.sum_us(i8* %lo, i64 %hi) + %21 = call i32 @test_sum_us(i8* %lo, i64 %hi) %add = add i32 %9, %21 %add2 = add i32 %6, %add store i32 %add2, i32* %sum, align 4 @@ -387,7 +389,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sumd(i8* %0, i64 %1) #0 { +define i32 @test_sumd(i8* %0, i64 %1) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -432,7 +434,7 @@ loop.exit: ; preds = %loop.cond } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %list = alloca %LinkedList, align 8 %i = alloca i32, align 4 @@ -457,21 +459,21 @@ entry: %vararg23 = alloca %"int[]", align 8 %a1 = alloca i32 (double, %Bobo*)*, align 8 %b2 = alloca i32 (double, %Bobo*)*, align 8 - %0 = call i32 @test.test_static() - %1 = call i32 @test.test_static() - %2 = call i32 @test.test_static() - call void @hello_world.hello() + %0 = call i32 @test_test_static() + %1 = call i32 @test_test_static() + %2 = call i32 @test_test_static() + call void @hello_world_hello() %3 = bitcast %LinkedList* %list to i8* call void @llvm.memset.p0i8.i64(i8* align 8 %3, i8 0, i64 24, i1 false) - call void @"std::array::linkedlist.int.LinkedList__push"(%LinkedList* %list, i32 10) - call void @"std::array::linkedlist.int.LinkedList__push"(%LinkedList* %list, i32 15) - call void @"std::array::linkedlist.int.LinkedList__push"(%LinkedList* %list, i32 30) + call void @"std_array_linkedlist$$int_LinkedList_push"(%LinkedList* %list, i32 10) + call void @"std_array_linkedlist$$int_LinkedList_push"(%LinkedList* %list, i32 15) + call void @"std_array_linkedlist$$int_LinkedList_push"(%LinkedList* %list, i32 30) store i32 0, i32* %i, align 4 br label %loop.cond loop.cond: ; preds = %loop.body, %entry %4 = load i32, i32* %i, align 4 - %5 = call i64 @"std::array::linkedlist.int.LinkedList__len"(%LinkedList* %list) #3 + %5 = call i64 @"std_array_linkedlist$$int_LinkedList_len"(%LinkedList* %list) #3 %uisitrunc = trunc i64 %5 to i32 %lt = icmp slt i32 %4, %uisitrunc br i1 %lt, label %loop.body, label %loop.exit @@ -480,7 +482,7 @@ loop.body: ; preds = %loop.cond %6 = load i32, i32* %i, align 4 %7 = load i32, i32* %i, align 4 %siuiext = sext i32 %7 to i64 - %8 = call i32 @"std::array::linkedlist.int.LinkedList__get"(%LinkedList* %list, i64 %siuiext) + %8 = call i32 @"std_array_linkedlist$$int_LinkedList_get"(%LinkedList* %list, i64 %siuiext) %9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i32 0, i32 0), i32 %6, i32 %8) %10 = load i32, i32* %i, align 4 %add = add i32 %10, 1 @@ -488,23 +490,23 @@ loop.body: ; preds = %loop.cond br label %loop.cond loop.exit: ; preds = %loop.cond - call void @"std::array::linkedlist.int.LinkedList__free"(%LinkedList* %list) + call void @"std_array_linkedlist$$int_LinkedList_free"(%LinkedList* %list) %11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i32 0, i32 0), i32 3) store i32 3, i32* %elements, align 4 %12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0)) %13 = bitcast %List* %array to i8* call void @llvm.memset.p0i8.i64(i8* align 8 %13, i8 0, i64 24, i1 false) - call void @"std::array::list.int.List__append"(%List* %array, i32 100) - call void @"std::array::list.int.List__append"(%List* %array, i32 200) - call void @"std::array::list.int.List__append"(%List* %array, i32 400) - call void @"std::array::list.int.List__push"(%List* %array, i32 600) #3 - call void @"std::array::list.int.List__insertAt"(%List* %array, i64 2, i32 300) + call void @"std_array_list$$int_List_append"(%List* %array, i32 100) + call void @"std_array_list$$int_List_append"(%List* %array, i32 200) + call void @"std_array_list$$int_List_append"(%List* %array, i32 400) + call void @"std_array_list$$int_List_push"(%List* %array, i32 600) #3 + call void @"std_array_list$$int_List_insertAt"(%List* %array, i64 2, i32 300) store i32 0, i32* %i1, align 4 br label %loop.cond2 loop.cond2: ; preds = %loop.body5, %loop.exit %14 = load i32, i32* %i1, align 4 - %15 = call i64 @"std::array::list.int.List__len"(%List* %array) + %15 = call i64 @"std_array_list$$int_List_len"(%List* %array) %uisitrunc3 = trunc i64 %15 to i32 %lt4 = icmp slt i32 %14, %uisitrunc3 br i1 %lt4, label %loop.body5, label %loop.exit8 @@ -513,7 +515,7 @@ loop.body5: ; preds = %loop.cond2 %16 = load i32, i32* %i1, align 4 %17 = load i32, i32* %i1, align 4 %siuiext6 = sext i32 %17 to i64 - %18 = call i32 @"std::array::list.int.List__get"(%List* %array, i64 %siuiext6) + %18 = call i32 @"std_array_list$$int_List_get"(%List* %array, i64 %siuiext6) %19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i32 %16, i32 %18) %20 = load i32, i32* %i1, align 4 %add7 = add i32 %20, 1 @@ -521,27 +523,27 @@ loop.body5: ; preds = %loop.cond2 br label %loop.cond2 loop.exit8: ; preds = %loop.cond2 - call void @"std::array::list.int.List__free"(%List* %array) + call void @"std_array_list$$int_List_free"(%List* %array) %21 = bitcast %Blob* %a to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %21, i8* align 4 bitcast (%Blob* @.__const.6 to i8*), i32 4, i1 false) %22 = bitcast %Blob.0* %b to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %22, i8* align 8 bitcast (%Blob.0* @.__const.7 to i8*), i32 8, i1 false) %23 = getelementptr inbounds %Blob, %Blob* %a, i32 0, i32 0 %24 = load i32, i32* %23, align 4 - %25 = call i32 @test2.int.getValue(i32 %24) + %25 = call i32 @"test2$$int_getValue"(i32 %24) %26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i32 0, i32 0), i32 %25) %27 = getelementptr inbounds %Blob.0, %Blob.0* %b, i32 0, i32 0 %28 = bitcast double* %tempcoerce to i8* %29 = bitcast double* %27 to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %28, i8* align 8 %29, i32 8, i1 false) %30 = load double, double* %tempcoerce, align 8 - %31 = call double @test2.double.getValue(double %30) + %31 = call double @"test2$$double_getValue"(double %30) %32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i32 0, i32 0), double %31) - %33 = call i32 @test2.int.getMult(i32 25) + %33 = call i32 @"test2$$int_getMult"(i32 25) %34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i32 0, i32 0), i32 %33) - %35 = call double @test2.double.getMult(double 3.300000e+00) + %35 = call double @"test2$$double_getMult"(double 3.300000e+00) %36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i32 0, i32 0), double %35) - call void @test.helloWorld() + call void @test_helloWorld() %37 = getelementptr inbounds %Foo, %Foo* %ddx, i32 0, i32 0 store i32 0, i32* %37, align 4 %38 = getelementptr inbounds %Foo, %Foo* %ddx, i32 0, i32 1 @@ -560,7 +562,7 @@ loop.exit8: ; preds = %loop.cond2 %lo = load i8*, i8** %45, align 8 %46 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %44, i32 0, i32 1 %hi = load i64, i64* %46, align 8 - %47 = call i32 @test.sum_us(i8* %lo, i64 %hi) + %47 = call i32 @test_sum_us(i8* %lo, i64 %hi) %48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i32 0, i32 0), i32 %47) %add9 = add i32 %40, %48 store i32 %add9, i32* %fro, align 4 @@ -582,7 +584,7 @@ loop.exit8: ; preds = %loop.cond2 %lo11 = load i8*, i8** %59, align 8 %60 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %58, i32 0, i32 1 %hi12 = load i64, i64* %60, align 8 - %61 = call i32 @test.sum_us(i8* %lo11, i64 %hi12) + %61 = call i32 @test_sum_us(i8* %lo11, i64 %hi12) %62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i32 0, i32 0), i32 %61) %63 = getelementptr inbounds %"int[]", %"int[]"* %vararg13, i32 0, i32 1 %64 = getelementptr inbounds %"int[]", %"int[]"* %vararg13, i32 0, i32 0 @@ -591,7 +593,7 @@ loop.exit8: ; preds = %loop.cond2 %lo14 = load i8*, i8** %66, align 8 %67 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %65, i32 0, i32 1 %hi15 = load i64, i64* %67, align 8 - %68 = call i32 @test.sum_us(i8* %lo14, i64 %hi15) + %68 = call i32 @test_sum_us(i8* %lo14, i64 %hi15) %69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i32 0, i32 0), i32 %68) %70 = getelementptr inbounds [4 x i32], [4 x i32]* %varargslots, i64 0, i64 0 store i32 1, i32* %70, align 4 @@ -611,7 +613,7 @@ loop.exit8: ; preds = %loop.cond2 %lo17 = load i8*, i8** %78, align 8 %79 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %77, i32 0, i32 1 %hi18 = load i64, i64* %79, align 8 - %80 = call i32 @test.sum_us(i8* %lo17, i64 %hi18) + %80 = call i32 @test_sum_us(i8* %lo17, i64 %hi18) %81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i32 0, i32 0), i32 %80) %82 = getelementptr inbounds [1 x i32], [1 x i32]* %varargslots20, i64 0, i64 0 store i32 1, i32* %82, align 4 @@ -625,7 +627,7 @@ loop.exit8: ; preds = %loop.cond2 %lo21 = load i8*, i8** %87, align 8 %88 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %86, i32 0, i32 1 %hi22 = load i64, i64* %88, align 8 - %89 = call i32 @test.sum_us(i8* %lo21, i64 %hi22) + %89 = call i32 @test_sum_us(i8* %lo21, i64 %hi22) %90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i32 0, i32 0), i32 %89) %91 = getelementptr inbounds %"int[]", %"int[]"* %vararg23, i32 0, i32 1 store i64 0, i64* %91, align 8 @@ -634,7 +636,7 @@ loop.exit8: ; preds = %loop.cond2 %lo24 = load i8*, i8** %93, align 8 %94 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %92, i32 0, i32 1 %hi25 = load i64, i64* %94, align 8 - %95 = call i32 @test.sum_us(i8* %lo24, i64 %hi25) + %95 = call i32 @test_sum_us(i8* %lo24, i64 %hi25) %96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i32 0, i32 0), i32 %95) store i32 (double, %Bobo*)* null, i32 (double, %Bobo*)** %a1, align 8 store i32 (double, %Bobo*)* null, i32 (double, %Bobo*)** %b2, align 8 @@ -643,16 +645,16 @@ loop.exit8: ; preds = %loop.cond2 // #expect: hello_world.ll -define void @hello_world.hello() +define void @hello_world_hello() entry: %0 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0)) - %1 = call double @foo.double.check(double 1.110000e+01) + %1 = call double @"foo$$double_check"(double 1.110000e+01) %2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), double %1) ret void // #expect: foo.double.ll -define double @foo.double.check(double %0) +define double @"foo$$double_check"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul @@ -661,20 +663,20 @@ entry: // #expect: test2.int.ll %Blob = type { i32 } -@test2.int.argh = local_unnamed_addr global i32 234, align 4 +@"test2$$int_argh" = local_unnamed_addr global i32 234, align 4 -define i32 @test2.int.getMult(i32 %0) #0 { +define i32 @"test2$$int_getMult"(i32 %0) #0 { entry: %mul = mul i32 %0, %0 ret i32 %mul } -define i32 @test2.int.hello() #0 { +define i32 @"test2$$int_hello"() #0 { entry: ret i32 1 } -define i32 @test2.int.getValue(i32 %0) #0 { +define i32 @"test2$$int_getValue"(i32 %0) #0 { entry: %blob = alloca %Blob, align 4 %1 = getelementptr inbounds %Blob, %Blob* %blob, i32 0, i32 0 @@ -687,18 +689,18 @@ entry: // #expect: test2.double.ll %Blob = type { double } -@test2.double.argh = local_unnamed_addr global double 2.340000e+02, align 8 +@"test2$$double_argh" = local_unnamed_addr global double 2.340000e+02, align 8 -define double @test2.double.getMult(double %0) +define double @"test2$$double_getMult"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul -define i32 @test2.double.hello() +define i32 @"test2$$double_hello"() entry: ret i32 1 -define double @test2.double.getValue(double %0) +define double @"test2$$double_getValue"(double %0) entry: %blob = alloca %Blob, align 8 %1 = getelementptr inbounds %Blob, %Blob* %blob, i32 0, i32 0 diff --git a/test/test_suite/functions/test_regression_mingw.c3t b/test/test_suite/functions/test_regression_mingw.c3t index d90470154..7ecf306d8 100644 --- a/test/test_suite/functions/test_regression_mingw.c3t +++ b/test/test_suite/functions/test_regression_mingw.c3t @@ -246,26 +246,29 @@ fn Type getValue(Blob blob) %List = type { i64, i64, i32* } %Foo = type { i32, i32 } -$.typeid.test.Bobo = comdat any +$"ct$test_Bobo" = comdat any -$.typeid.test.Blob = comdat any +$"ct$test_Blob" = comdat any -$.typeid.test.Foor = comdat any +$"ct$test_Foor" = comdat any -$.typeid.test.Foo2 = comdat any +$"ct$test_Foo2" = comdat any -$.typeid.test.Foo = comdat any +$"ct$test_Foo" = comdat any -$.typeid.test.MyEnum = comdat any +$"ct$int" = comdat any -@.typeid.test.Bobo = linkonce constant { i8, i64 } { i8 10, i64 6 }, comdat, align 8 -@.typeid.test.Blob = linkonce constant { i8, i64 } { i8 10, i64 2 }, comdat, align 8 -@.typeid.test.Foor = linkonce constant { i8, i64 } { i8 11, i64 2 }, comdat, align 8 -@.typeid.test.Foo2 = linkonce constant { i8, i64 } { i8 10, i64 1 }, comdat, align 8 -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, comdat, align 8 -@.typeid.test.MyEnum = linkonce constant { i8, i64, i64 } { i8 8, i64 3, i64 0 }, comdat, align 8 +$"ct$test_MyEnum" = comdat any + +@"ct$test_Bobo" = linkonce constant %.introspect { i8 10, i64 20, i64 0, i64 6, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Blob" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Foor" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Foo2" = linkonce constant %.introspect { i8 10, i64 4, i64 0, i64 1, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_MyEnum" = linkonce constant %.introspect { i8 8, i64 4, i64 ptrtoint (%.introspect* @"ct$int" to i64), i64 3, [0 x i64] zeroinitializer }, comdat, align 8 @.str = private unnamed_addr constant [13 x i8] c"helloWorld!\0A\00", align 1 -@test_static.x = internal unnamed_addr global i32 1, align 4 +@"test_static$x" = internal unnamed_addr global i32 1, align 4 @.str.1 = private unnamed_addr constant [16 x i8] c"Test static %d\0A\00", align 1 @.__const = private unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 3], align 4 @.str.2 = private unnamed_addr constant [17 x i8] c"Element[%d]: %d\0A\00", align 1 @@ -291,7 +294,7 @@ $.typeid.test.MyEnum = comdat any @.str.22 = private unnamed_addr constant [9 x i8] c"Mutating\00", align 1 ; Function Attrs: nounwind -define void @test.Foo2__printme(%Foo2* %0) #0 { +define void @test_Foo2_printme(%Foo2* %0) #0 { entry: %1 = getelementptr inbounds %Foo2, %Foo2* %0, i32 0, i32 0 %2 = load i32, i32* %1, align 8 @@ -300,7 +303,7 @@ entry: } ; Function Attrs: nounwind -define i32 @test.Foo2__mutate(%Foo2* %0) #0 { +define i32 @test_Foo2_mutate(%Foo2* %0) #0 { entry: %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.22, i32 0, i32 0)) %2 = getelementptr inbounds %Foo2, %Foo2* %0, i32 0, i32 0 @@ -314,26 +317,26 @@ entry: declare i32 @printf(i8*, ...) #0 ; Function Attrs: nounwind -define void @test.helloWorld() #0 { +define void @test_helloWorld() #0 { entry: %0 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0)) ret void } ; Function Attrs: nounwind -define i32 @test.test_static() #0 { +define i32 @test_test_static() #0 { entry: - %0 = load i32, i32* @test_static.x, align 4 + %0 = load i32, i32* @"test_static$x", align 4 %add = add i32 %0, 1 - store i32 %add, i32* @test_static.x, align 4 - %1 = load i32, i32* @test_static.x, align 4 + store i32 %add, i32* @"test_static$x", align 4 + %1 = load i32, i32* @"test_static$x", align 4 %2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i32 0, i32 0), i32 %1) - %3 = load i32, i32* @test_static.x, align 4 + %3 = load i32, i32* @"test_static$x", align 4 ret i32 %3 } ; Function Attrs: nounwind -define i32 @test.helo(double %0, %Bobo* align 4 %1) #0 { +define i32 @test_helo(double %0, %Bobo* align 4 %1) #0 { entry: %b = alloca %Bobo, align 4 %de = alloca [3 x i32], align 4 @@ -350,12 +353,12 @@ entry: %7 = bitcast %Bobo* %indirectarg to i8* %8 = bitcast %Bobo* %c to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %7, i8* align 4 %8, i32 20, i1 false) - %9 = call i32 @test.helo(double 1.000000e+00, %Bobo* align 4 %indirectarg) + %9 = call i32 @test_helo(double 1.000000e+00, %Bobo* align 4 %indirectarg) ret i32 1 } ; Function Attrs: nounwind -define i32 @test.test1(i32 %0, i32 %1) #0 { +define i32 @test_test1(i32 %0, i32 %1) #0 { entry: %a = alloca i32, align 4 store i32 %0, i32* %a, align 4 @@ -375,7 +378,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sum_us(%"int[]"* align 8 %0) #0 { +define i32 @test_sum_us(%"int[]"* align 8 %0) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -411,7 +414,7 @@ if.exit: ; preds = %entry %15 = getelementptr inbounds %"int[]", %"int[]"* %vararg, i32 0, i32 1 %16 = getelementptr inbounds %"int[]", %"int[]"* %vararg, i32 0, i32 0 store %"int[]" %14, %"int[]"* %indirectarg, align 8 - %17 = call i32 @test.sum_us(%"int[]"* %indirectarg) + %17 = call i32 @test_sum_us(%"int[]"* %indirectarg) %add = add i32 %8, %17 %add2 = add i32 %5, %add store i32 %add2, i32* %sum, align 4 @@ -420,7 +423,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sumd(%"int[]"* align 8 %0) #0 { +define i32 @test_sumd(%"int[]"* align 8 %0) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -463,7 +466,7 @@ loop.exit: ; preds = %loop.cond } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %list = alloca %LinkedList, align 8 %i = alloca i32, align 4 @@ -494,21 +497,21 @@ entry: %indirectarg20 = alloca %"int[]", align 8 %a1 = alloca i32 (double, %Bobo*)*, align 8 %b2 = alloca i32 (double, %Bobo*)*, align 8 - %0 = call i32 @test.test_static() - %1 = call i32 @test.test_static() - %2 = call i32 @test.test_static() - call void @hello_world.hello() + %0 = call i32 @test_test_static() + %1 = call i32 @test_test_static() + %2 = call i32 @test_test_static() + call void @hello_world_hello() %3 = bitcast %LinkedList* %list to i8* call void @llvm.memset.p0i8.i64(i8* align 8 %3, i8 0, i64 24, i1 false) - call void @"std::array::linkedlist.int.LinkedList__push"(%LinkedList* %list, i32 10) - call void @"std::array::linkedlist.int.LinkedList__push"(%LinkedList* %list, i32 15) - call void @"std::array::linkedlist.int.LinkedList__push"(%LinkedList* %list, i32 30) + call void @"std_array_linkedlist$$int_LinkedList_push"(%LinkedList* %list, i32 10) + call void @"std_array_linkedlist$$int_LinkedList_push"(%LinkedList* %list, i32 15) + call void @"std_array_linkedlist$$int_LinkedList_push"(%LinkedList* %list, i32 30) store i32 0, i32* %i, align 4 br label %loop.cond loop.cond: ; preds = %loop.body, %entry %4 = load i32, i32* %i, align 4 - %5 = call i64 @"std::array::linkedlist.int.LinkedList__len"(%LinkedList* %list) #3 + %5 = call i64 @"std_array_linkedlist$$int_LinkedList_len"(%LinkedList* %list) #3 %uisitrunc = trunc i64 %5 to i32 %lt = icmp slt i32 %4, %uisitrunc br i1 %lt, label %loop.body, label %loop.exit @@ -517,7 +520,7 @@ loop.body: ; preds = %loop.cond %6 = load i32, i32* %i, align 4 %7 = load i32, i32* %i, align 4 %siuiext = sext i32 %7 to i64 - %8 = call i32 @"std::array::linkedlist.int.LinkedList__get"(%LinkedList* %list, i64 %siuiext) + %8 = call i32 @"std_array_linkedlist$$int_LinkedList_get"(%LinkedList* %list, i64 %siuiext) %9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i32 0, i32 0), i32 %6, i32 %8) %10 = load i32, i32* %i, align 4 %add = add i32 %10, 1 @@ -525,23 +528,23 @@ loop.body: ; preds = %loop.cond br label %loop.cond loop.exit: ; preds = %loop.cond - call void @"std::array::linkedlist.int.LinkedList__free"(%LinkedList* %list) + call void @"std_array_linkedlist$$int_LinkedList_free"(%LinkedList* %list) %11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i32 0, i32 0), i32 3) store i32 3, i32* %elements, align 4 %12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0)) %13 = bitcast %List* %array to i8* call void @llvm.memset.p0i8.i64(i8* align 8 %13, i8 0, i64 24, i1 false) - call void @"std::array::list.int.List__append"(%List* %array, i32 100) - call void @"std::array::list.int.List__append"(%List* %array, i32 200) - call void @"std::array::list.int.List__append"(%List* %array, i32 400) - call void @"std::array::list.int.List__push"(%List* %array, i32 600) #3 - call void @"std::array::list.int.List__insertAt"(%List* %array, i64 2, i32 300) + call void @"std_array_list$$int_List_append"(%List* %array, i32 100) + call void @"std_array_list$$int_List_append"(%List* %array, i32 200) + call void @"std_array_list$$int_List_append"(%List* %array, i32 400) + call void @"std_array_list$$int_List_push"(%List* %array, i32 600) #3 + call void @"std_array_list$$int_List_insertAt"(%List* %array, i64 2, i32 300) store i32 0, i32* %i1, align 4 br label %loop.cond2 loop.cond2: ; preds = %loop.body5, %loop.exit %14 = load i32, i32* %i1, align 4 - %15 = call i64 @"std::array::list.int.List__len"(%List* %array) + %15 = call i64 @"std_array_list$$int_List_len"(%List* %array) %uisitrunc3 = trunc i64 %15 to i32 %lt4 = icmp slt i32 %14, %uisitrunc3 br i1 %lt4, label %loop.body5, label %loop.exit8 @@ -550,7 +553,7 @@ loop.body5: ; preds = %loop.cond2 %16 = load i32, i32* %i1, align 4 %17 = load i32, i32* %i1, align 4 %siuiext6 = sext i32 %17 to i64 - %18 = call i32 @"std::array::list.int.List__get"(%List* %array, i64 %siuiext6) + %18 = call i32 @"std_array_list$$int_List_get"(%List* %array, i64 %siuiext6) %19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i32 0, i32 0), i32 %16, i32 %18) %20 = load i32, i32* %i1, align 4 %add7 = add i32 %20, 1 @@ -558,27 +561,27 @@ loop.body5: ; preds = %loop.cond2 br label %loop.cond2 loop.exit8: ; preds = %loop.cond2 - call void @"std::array::list.int.List__free"(%List* %array) + call void @"std_array_list$$int_List_free"(%List* %array) %21 = bitcast %Blob* %a to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %21, i8* align 4 bitcast (%Blob* @.__const.6 to i8*), i32 4, i1 false) %22 = bitcast %Blob.0* %b to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %22, i8* align 8 bitcast (%Blob.0* @.__const.7 to i8*), i32 8, i1 false) %23 = getelementptr inbounds %Blob, %Blob* %a, i32 0, i32 0 %24 = load i32, i32* %23, align 4 - %25 = call i32 @test2.int.getValue(i32 %24) + %25 = call i32 @"test2$$int_getValue"(i32 %24) %26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i32 0, i32 0), i32 %25) %27 = getelementptr inbounds %Blob.0, %Blob.0* %b, i32 0, i32 0 %28 = bitcast i64* %tempcoerce to i8* %29 = bitcast double* %27 to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %28, i8* align 8 %29, i32 8, i1 false) %30 = load i64, i64* %tempcoerce, align 8 - %31 = call double @test2.double.getValue(i64 %30) + %31 = call double @"test2$$double_getValue"(i64 %30) %32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i32 0, i32 0), double %31) - %33 = call i32 @test2.int.getMult(i32 25) + %33 = call i32 @"test2$$int_getMult"(i32 25) %34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i32 0, i32 0), i32 %33) - %35 = call double @test2.double.getMult(double 3.300000e+00) + %35 = call double @"test2$$double_getMult"(double 3.300000e+00) %36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i32 0, i32 0), double %35) - call void @test.helloWorld() + call void @test_helloWorld() %37 = getelementptr inbounds %Foo, %Foo* %ddx, i32 0, i32 0 store i32 0, i32* %37, align 4 %38 = getelementptr inbounds %Foo, %Foo* %ddx, i32 0, i32 1 @@ -595,7 +598,7 @@ loop.exit8: ; preds = %loop.cond2 %44 = bitcast %"int[]"* %indirectarg to i8* %45 = bitcast %"int[]"* %vararg to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %44, i8* align 8 %45, i32 16, i1 false) - %46 = call i32 @test.sum_us(%"int[]"* %indirectarg) + %46 = call i32 @test_sum_us(%"int[]"* %indirectarg) %47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i32 0, i32 0), i32 %46) %add9 = add i32 %40, %47 store i32 %add9, i32* %fro, align 4 @@ -615,14 +618,14 @@ loop.exit8: ; preds = %loop.cond2 %57 = bitcast %"int[]"* %indirectarg11 to i8* %58 = bitcast %"int[]"* %vararg10 to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %57, i8* align 8 %58, i32 16, i1 false) - %59 = call i32 @test.sum_us(%"int[]"* %indirectarg11) + %59 = call i32 @test_sum_us(%"int[]"* %indirectarg11) %60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i32 0, i32 0), i32 %59) %61 = getelementptr inbounds %"int[]", %"int[]"* %vararg12, i32 0, i32 1 %62 = getelementptr inbounds %"int[]", %"int[]"* %vararg12, i32 0, i32 0 %63 = bitcast %"int[]"* %indirectarg13 to i8* %64 = bitcast %"int[]"* %z to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %63, i8* align 8 %64, i32 16, i1 false) - %65 = call i32 @test.sum_us(%"int[]"* %indirectarg13) + %65 = call i32 @test_sum_us(%"int[]"* %indirectarg13) %66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.17, i32 0, i32 0), i32 %65) %67 = getelementptr inbounds [4 x i32], [4 x i32]* %varargslots, i64 0, i64 0 store i32 1, i32* %67, align 4 @@ -640,7 +643,7 @@ loop.exit8: ; preds = %loop.cond2 %74 = bitcast %"int[]"* %indirectarg15 to i8* %75 = bitcast %"int[]"* %vararg14 to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %74, i8* align 8 %75, i32 16, i1 false) - %76 = call i32 @test.sum_us(%"int[]"* %indirectarg15) + %76 = call i32 @test_sum_us(%"int[]"* %indirectarg15) %77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i32 0, i32 0), i32 %76) %78 = getelementptr inbounds [1 x i32], [1 x i32]* %varargslots17, i64 0, i64 0 store i32 1, i32* %78, align 4 @@ -652,14 +655,14 @@ loop.exit8: ; preds = %loop.cond2 %82 = bitcast %"int[]"* %indirectarg18 to i8* %83 = bitcast %"int[]"* %vararg16 to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %82, i8* align 8 %83, i32 16, i1 false) - %84 = call i32 @test.sum_us(%"int[]"* %indirectarg18) + %84 = call i32 @test_sum_us(%"int[]"* %indirectarg18) %85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i32 0, i32 0), i32 %84) %86 = getelementptr inbounds %"int[]", %"int[]"* %vararg19, i32 0, i32 1 store i64 0, i64* %86, align 8 %87 = bitcast %"int[]"* %indirectarg20 to i8* %88 = bitcast %"int[]"* %vararg19 to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %87, i8* align 8 %88, i32 16, i1 false) - %89 = call i32 @test.sum_us(%"int[]"* %indirectarg20) + %89 = call i32 @test_sum_us(%"int[]"* %indirectarg20) %90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.20, i32 0, i32 0), i32 %89) store i32 (double, %Bobo*)* null, i32 (double, %Bobo*)** %a1, align 8 store i32 (double, %Bobo*)* null, i32 (double, %Bobo*)** %b2, align 8 @@ -668,50 +671,52 @@ loop.exit8: ; preds = %loop.cond2 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1 -declare void @hello_world.hello() +declare void @hello_world_hello() declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2 -declare void @"std::array::linkedlist.int.LinkedList__push"(%LinkedList*, i32) +declare void @"std_array_linkedlist$$int_LinkedList_push"(%LinkedList*, i32) -declare i64 @"std::array::linkedlist.int.LinkedList__len"(%LinkedList*) +declare i64 @"std_array_linkedlist$$int_LinkedList_len"(%LinkedList*) -declare i32 @"std::array::linkedlist.int.LinkedList__get"(%LinkedList*, i64) +declare i32 @"std_array_linkedlist$$int_LinkedList_get"(%LinkedList*, i64) -declare void @"std::array::linkedlist.int.LinkedList__free"(%LinkedList*) +declare void @"std_array_linkedlist$$int_LinkedList_free"(%LinkedList*) -declare void @"std::array::list.int.List__append"(%List*, i32) +declare void @"std_array_list$$int_List_append"(%List*, i32) -declare void @"std::array::list.int.List__push"(%List*, i32) +declare void @"std_array_list$$int_List_push"(%List*, i32) -declare void @"std::array::list.int.List__insertAt"(%List*, i64, i32) +declare void @"std_array_list$$int_List_insertAt"(%List*, i64, i32) -declare i64 @"std::array::list.int.List__len"(%List*) +declare i64 @"std_array_list$$int_List_len"(%List*) -declare i32 @"std::array::list.int.List__get"(%List*, i64) +declare i32 @"std_array_list$$int_List_get"(%List*, i64) -declare void @"std::array::list.int.List__free"(%List*) +declare void @"std_array_list$$int_List_free"(%List*) -declare i32 @test2.int.getValue(i32) +declare i32 @"test2$$int_getValue"(i32) -declare double @test2.double.getValue(i64) +declare double @"test2$$double_getValue"(i64) -declare i32 @test2.int.getMult(i32) +declare i32 @"test2$$int_getMult"(i32) + +declare double @"test2$$double_getMult"(double) -declare double @test2.double.getMult(double) // #expect: hello_world.ll -define void @hello_world.hello() +define void @hello_world_hello() #0 { entry: %0 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i32 0, i32 0)) - %1 = call double @foo.double.check(double 1.110000e+01) + %1 = call double @"foo$$double_check"(double 1.110000e+01) %2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), double %1) ret void +} // #expect: foo.double.ll -define double @foo.double.check(double %0) +define double @"foo$$double_check"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul @@ -720,19 +725,19 @@ entry: // #expect: test2.int.ll %Blob = type { i32 } -@test2.int.argh = local_unnamed_addr global i32 234, align 4 +@"test2$$int_argh" = local_unnamed_addr global i32 234, align 4 -define i32 @test2.int.getMult(i32 %0) +define i32 @"test2$$int_getMult"(i32 %0) entry: %mul = mul i32 %0, %0 ret i32 %mul -define i32 @test2.int.hello() +define i32 @"test2$$int_hello"() entry: ret i32 1 } -define i32 @test2.int.getValue(i32 %0) +define i32 @"test2$$int_getValue"(i32 %0) entry: %blob = alloca %Blob, align 4 %1 = getelementptr inbounds %Blob, %Blob* %blob, i32 0, i32 0 @@ -745,19 +750,19 @@ entry: // #expect: test2.double.ll %Blob = type { double } -@test2.double.argh = local_unnamed_addr global double 2.340000e+02, align 8 +@"test2$$double_argh" = local_unnamed_addr global double 2.340000e+02, align 8 -define double @test2.double.getMult(double %0) +define double @"test2$$double_getMult"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul -define i32 @test2.double.hello() +define i32 @"test2$$double_hello"() entry: ret i32 1 -define double @test2.double.getValue(i64 %0) +define double @"test2$$double_getValue"(i64 %0) entry: %blob = alloca %Blob, align 8 %1 = getelementptr inbounds %Blob, %Blob* %blob, i32 0, i32 0 diff --git a/test/test_suite/functions/typeless_varargs.c3t b/test/test_suite/functions/typeless_varargs.c3t index 722d74864..203d0611f 100644 --- a/test/test_suite/functions/typeless_varargs.c3t +++ b/test/test_suite/functions/typeless_varargs.c3t @@ -22,9 +22,7 @@ fn int main() /* #expect: test.ll -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 - -define void @test.retest(i8* %0, i64 %1) #0 { +define void @test_retest(i8* %0, i64 %1) #0 { entry: %foo = alloca %"variant[]", align 8 %vararg = alloca %"variant[]", align 8 @@ -40,11 +38,12 @@ entry: %lo = load i8*, i8** %7, align 8 %8 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %6, i32 0, i32 1 %hi = load i64, i64* %8, align 8 - call void @test.test(i8* %lo, i64 %hi) + call void @test_test(i8* %lo, i64 %hi) ret void } -define void @test.test(i8* %0, i64 %1) #0 { +; Function Attrs: nounwind +define void @test_test(i8* %0, i64 %1) #0 { entry: %foo = alloca %"variant[]", align 8 %pair = bitcast %"variant[]"* %foo to { i8*, i64 }* @@ -63,6 +62,7 @@ entry: ret void } +; Function Attrs: nounwind define i32 @main() #0 { entry: %i = alloca i32, align 4 @@ -76,7 +76,7 @@ entry: store i32 1, i32* %taddr, align 4 %0 = bitcast i32* %taddr to i8* %1 = insertvalue %variant undef, i8* %0, 0 - %2 = insertvalue %variant %1, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %2 = insertvalue %variant %1, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 %3 = getelementptr inbounds [1 x %variant], [1 x %variant]* %varargslots, i64 0, i64 0 store %variant %2, %variant* %3, align 16 %4 = getelementptr inbounds %"variant[]", %"variant[]"* %vararg, i32 0, i32 1 @@ -89,11 +89,11 @@ entry: %lo = load i8*, i8** %8, align 8 %9 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %7, i32 0, i32 1 %hi = load i64, i64* %9, align 8 - call void @test.test(i8* %lo, i64 %hi) + call void @test_test(i8* %lo, i64 %hi) store i32 1, i32* %taddr3, align 4 %10 = bitcast i32* %taddr3 to i8* %11 = insertvalue %variant undef, i8* %10, 0 - %12 = insertvalue %variant %11, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %12 = insertvalue %variant %11, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 %13 = getelementptr inbounds [1 x %variant], [1 x %variant]* %varargslots2, i64 0, i64 0 store %variant %12, %variant* %13, align 16 %14 = getelementptr inbounds %"variant[]", %"variant[]"* %vararg1, i32 0, i32 1 @@ -106,6 +106,6 @@ entry: %lo4 = load i8*, i8** %18, align 8 %19 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %17, i32 0, i32 1 %hi5 = load i64, i64* %19, align 8 - call void @test.retest(i8* %lo4, i64 %hi5) + call void @test_retest(i8* %lo4, i64 %hi5) ret i32 1 } \ No newline at end of file diff --git a/test/test_suite/generic/generic_idents.c3t b/test/test_suite/generic/generic_idents.c3t index c957deedd..c39f0ba0e 100644 --- a/test/test_suite/generic/generic_idents.c3t +++ b/test/test_suite/generic/generic_idents.c3t @@ -26,15 +26,15 @@ fn double getIt2(double i) return doubleAddMult(i, 2, 3); } -// #expect: gen.int.ll +/* #expect: gen.int.ll -define i32 @gen.int.mult(i32 %0) #0 { +define i32 @"gen$$int_mult"(i32 %0) #0 { entry: %mul = mul i32 %0, %0 ret i32 %mul } -define i32 @gen.int.addMult(i32 %0, i32 %1, i32 %2) #0 { +define i32 @"gen$$int_addMult"(i32 %0, i32 %1, i32 %2) #0 { entry: %mul = mul i32 %0, %1 %add = add i32 %mul, %2 @@ -44,26 +44,26 @@ entry: // #expect: test.ll -define i32 @test.getIt(i32 %0) #0 { +define i32 @test_getIt(i32 %0) #0 { entry: - %1 = call i32 @gen.int.mult(i32 %0) + %1 = call i32 @"gen$$int_mult"(i32 %0) %add = add i32 %1, 1 ret i32 %add } -define double @test.getIt2(double %0) #0 { +define double @test_getIt2(double %0) #0 { entry: - %1 = call double @gen.double.addMult(double %0, double 2.000000e+00, double 3.000000e+00) + %1 = call double @"gen$$double_addMult"(double %0, double 2.000000e+00, double 3.000000e+00) ret double %1 } -declare i32 @gen.int.mult(i32) +declare i32 @"gen$$int_mult"(i32) -declare double @gen.double.addMult(double, double, double) +declare double @"gen$$double_addMult"(double, double, double) // #expect: gen.double.ll -define double @gen.double.addMult(double %0, double %1, double %2) +define double @"gen$$double_addMult"(double %0, double %1, double %2) %fmul = fmul double %0, %1 %fadd = fadd double %fmul, %2 ret double %fadd diff --git a/test/test_suite/globals/global_align.c3t b/test/test_suite/globals/global_align.c3t index 73727cf1c..9efcc00b0 100644 --- a/test/test_suite/globals/global_align.c3t +++ b/test/test_suite/globals/global_align.c3t @@ -11,12 +11,12 @@ fn void test() // #expect: abc.ll -@abc.foo = local_unnamed_addr global i32 0, align 32 +@abc_foo = local_unnamed_addr global i32 0, align 32 -define void @abc.test() #0 { +define void @abc_test() #0 { entry: %x = alloca i32, align 4 - %0 = load i32, i32* @abc.foo, align 32 + %0 = load i32, i32* @abc_foo, align 32 store i32 %0, i32* %x, align 4 ret void } diff --git a/test/test_suite/import/access_other_module.c3t b/test/test_suite/import/access_other_module.c3t index 54d4f3d0c..b78189bd8 100644 --- a/test/test_suite/import/access_other_module.c3t +++ b/test/test_suite/import/access_other_module.c3t @@ -10,15 +10,15 @@ fn void main() /* #expect: foo.ll -@"std::math.DIV_1_SQRT2" = external global double +@std_math_DIV_1_SQRT2 = external global double -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %foekf = alloca i8*, align 8 %xok = alloca double*, align 8 - store i8* bitcast (double (double)* @"std::math.log" to i8*), i8** %foekf, align 8 - store double* @"std::math.DIV_1_SQRT2", double** %xok, align 8 + store i8* bitcast (double (double)* @std_math_log to i8*), i8** %foekf, align 8 + store double* @std_math_DIV_1_SQRT2, double** %xok, align 8 ret void } -declare double @"std::math.log"(double) \ No newline at end of file +declare double @std_math_log(double) \ No newline at end of file diff --git a/test/test_suite/initializer_lists/fasta.c3t b/test/test_suite/initializer_lists/fasta.c3t index 3ff04f1d1..016a18b64 100644 --- a/test/test_suite/initializer_lists/fasta.c3t +++ b/test/test_suite/initializer_lists/fasta.c3t @@ -110,35 +110,35 @@ fn void main(int argc, char **argv) %"char[]" = type { i8*, i64 } %"double[]" = type { double*, i64 } -@fasta.IM = local_unnamed_addr constant i32 139968, align 4 -@fasta.IA = local_unnamed_addr constant i32 3877, align 4 -@fasta.IC = local_unnamed_addr constant i32 29573, align 4 -@fasta.SEED = local_unnamed_addr constant i32 42, align 4 -@fasta.seed = local_unnamed_addr global i32 42, align 4 +@fasta_IM = local_unnamed_addr constant i32 139968, align 4 +@fasta_IA = local_unnamed_addr constant i32 3877, align 4 +@fasta_IC = local_unnamed_addr constant i32 29573, align 4 +@fasta_SEED = local_unnamed_addr constant i32 42, align 4 +@fasta_seed = local_unnamed_addr global i32 42, align 4 @.str = private unnamed_addr constant [288 x i8] c"GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA\00", align 1 -@fasta.alu = protected unnamed_addr global %"char[]" { i8* getelementptr inbounds ([288 x i8], [288 x i8]* @.str, i32 0, i32 0), i64 287 }, align 8 +@fasta_alu = protected unnamed_addr global %"char[]" { i8* getelementptr inbounds ([288 x i8], [288 x i8]* @.str, i32 0, i32 0), i64 287 }, align 8 @.str.11 = private unnamed_addr constant [16 x i8] c"acgtBDHKMNRSVWY\00", align 1 -@fasta.iub = local_unnamed_addr global %"char[]" { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i32 0, i32 0), i64 15 }, align 8 +@fasta_iub = local_unnamed_addr global %"char[]" { i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i32 0, i32 0), i64 15 }, align 8 @.taddr = private global [15 x double] [double 2.700000e-01, double 1.200000e-01, double 1.200000e-01, double 2.700000e-01, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02], align 8 -@fasta.iub_p = local_unnamed_addr global %"double[]" { double* getelementptr inbounds ([15 x double], [15 x double]* @.taddr, i32 0, i32 0), i64 15 }, align 8 +@fasta_iub_p = local_unnamed_addr global %"double[]" { double* getelementptr inbounds ([15 x double], [15 x double]* @.taddr, i32 0, i32 0), i64 15 }, align 8 @.str.12 = private unnamed_addr constant [5 x i8] c"acgt\00", align 1 -@fasta.homosapiens = local_unnamed_addr global %"char[]" { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i64 4 }, align 8 +@fasta_homosapiens = local_unnamed_addr global %"char[]" { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i64 4 }, align 8 @.taddr.13 = private global [4 x double] [double 0x3FD3639D20BAEB5B, double 0x3FC957AE3DCD561B, double 0x3FC9493AEAB6C2BF, double 0x3FD34BEE4B030838], align 8 -@fasta.homosapiens_p = local_unnamed_addr global %"double[]" { double* getelementptr inbounds ([4 x double], [4 x double]* @.taddr.13, i32 0, i32 0), i64 4 }, align 8 -@fasta.LINELEN = local_unnamed_addr constant i32 60, align 4 +@fasta_homosapiens_p = local_unnamed_addr global %"double[]" { double* getelementptr inbounds ([4 x double], [4 x double]* @.taddr.13, i32 0, i32 0), i64 4 }, align 8 +@fasta_LINELEN = local_unnamed_addr constant i32 60, align 4 @.str.14 = private unnamed_addr constant [23 x i8] c">ONE Homo sapiens alu\0A\00", align 1 @.str.15 = private unnamed_addr constant [26 x i8] c">TWO IUB ambiguity codes\0A\00", align 1 @.str.16 = private unnamed_addr constant [31 x i8] c">THREE Homo sapiens frequency\0A\00", align 1 ; Function Attrs: nounwind -define float @fasta.fasta_rand(float %0) #0 { +define float @fasta_fasta_rand(float %0) #0 { entry: - %1 = load i32, i32* @fasta.seed, align 4 + %1 = load i32, i32* @fasta_seed, align 4 %mul = mul i32 %1, 3877 %add = add i32 %mul, 29573 %umod = urem i32 %add, 139968 - store i32 %umod, i32* @fasta.seed, align 4 - %2 = load i32, i32* @fasta.seed, align 4 + store i32 %umod, i32* @fasta_seed, align 4 + %2 = load i32, i32* @fasta_seed, align 4 %uifp = uitofp i32 %2 to float %fmul = fmul float %0, %uifp %fdiv = fdiv float %fmul, 1.399680e+05 @@ -155,7 +155,7 @@ declare i32 @printf(i8*, ...) #0 declare void @putchar(i32) #0 ; Function Attrs: nounwind -define void @fasta.repeat_fasta(i8* %0, i64 %1, i32 %2) #0 { +define void @fasta_repeat_fasta(i8* %0, i64 %1, i32 %2) #0 { entry: %seq = alloca %"char[]", align 8 %len = alloca i64, align 8 @@ -217,7 +217,7 @@ if.exit4: ; preds = %if.then3, %loop.exi } ; Function Attrs: nounwind -define void @fasta.random_fasta(i8* %0, i64 %1, i8* %2, i64 %3, i32 %4) #0 { +define void @fasta_random_fasta(i8* %0, i64 %1, i8* %2, i64 %3, i32 %4) #0 { entry: %symb = alloca %"char[]", align 8 %probability = alloca %"double[]", align 8 @@ -254,7 +254,7 @@ loop.cond: ; preds = %if.exit10, %entry br i1 %lt, label %loop.body, label %loop.exit12 loop.body: ; preds = %loop.cond - %16 = call float @fasta.fasta_rand(float 1.000000e+00) + %16 = call float @fasta_fasta_rand(float 1.000000e+00) %fpfpext = fpext float %16 to double store double %fpfpext, double* %v, align 8 store i32 0, i32* %j, align 4 @@ -329,7 +329,7 @@ if.exit15: ; preds = %if.then14, %loop.ex } ; Function Attrs: nounwind -define void @fasta.main(i32 %0, i8** %1) #0 { +define void @fasta_main(i32 %0, i8** %1) #0 { entry: %n = alloca i32, align 4 store i32 1000, i32* %n, align 4 @@ -345,32 +345,32 @@ if.then: ; preds = %entry if.exit: ; preds = %if.then, %entry %4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i32 0, i32 0)) - %lo = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta.alu to { i8*, i64 }*), i32 0, i32 0), align 8 - %hi = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta.alu to { i8*, i64 }*), i32 0, i32 1), align 8 + %lo = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta_alu to { i8*, i64 }*), i32 0, i32 0), align 8 + %hi = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta_alu to { i8*, i64 }*), i32 0, i32 1), align 8 %5 = load i32, i32* %n, align 4 %mul = mul i32 %5, 2 - call void @fasta.repeat_fasta(i8* %lo, i64 %hi, i32 %mul) + call void @fasta_repeat_fasta(i8* %lo, i64 %hi, i32 %mul) %6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i32 0, i32 0)) - %lo1 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta.iub to { i8*, i64 }*), i32 0, i32 0), align 8 - %hi2 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta.iub to { i8*, i64 }*), i32 0, i32 1), align 8 - %lo3 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta.iub_p to { i8*, i64 }*), i32 0, i32 0), align 8 - %hi4 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta.iub_p to { i8*, i64 }*), i32 0, i32 1), align 8 + %lo1 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta_iub to { i8*, i64 }*), i32 0, i32 0), align 8 + %hi2 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta_iub to { i8*, i64 }*), i32 0, i32 1), align 8 + %lo3 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta_iub_p to { i8*, i64 }*), i32 0, i32 0), align 8 + %hi4 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta_iub_p to { i8*, i64 }*), i32 0, i32 1), align 8 %7 = load i32, i32* %n, align 4 %mul5 = mul i32 %7, 3 - call void @fasta.random_fasta(i8* %lo1, i64 %hi2, i8* %lo3, i64 %hi4, i32 %mul5) + call void @fasta_random_fasta(i8* %lo1, i64 %hi2, i8* %lo3, i64 %hi4, i32 %mul5) %8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.16, i32 0, i32 0)) - %lo6 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta.homosapiens to { i8*, i64 }*), i32 0, i32 0), align 8 - %hi7 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta.homosapiens to { i8*, i64 }*), i32 0, i32 1), align 8 - %lo8 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta.homosapiens_p to { i8*, i64 }*), i32 0, i32 0), align 8 - %hi9 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta.homosapiens_p to { i8*, i64 }*), i32 0, i32 1), align 8 + %lo6 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta_homosapiens to { i8*, i64 }*), i32 0, i32 0), align 8 + %hi7 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"char[]"* @fasta_homosapiens to { i8*, i64 }*), i32 0, i32 1), align 8 + %lo8 = load i8*, i8** getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta_homosapiens_p to { i8*, i64 }*), i32 0, i32 0), align 8 + %hi9 = load i64, i64* getelementptr inbounds ({ i8*, i64 }, { i8*, i64 }* bitcast (%"double[]"* @fasta_homosapiens_p to { i8*, i64 }*), i32 0, i32 1), align 8 %9 = load i32, i32* %n, align 4 %mul10 = mul i32 %9, 5 - call void @fasta.random_fasta(i8* %lo6, i64 %hi7, i8* %lo8, i64 %hi9, i32 %mul10) + call void @fasta_random_fasta(i8* %lo6, i64 %hi7, i8* %lo8, i64 %hi9, i32 %mul10) ret void } define i32 @main(i32 %0, i8** %1) #0 { entry: - call void @fasta.main(i32 %0, i8** %1) + call void @fasta_main(i32 %0, i8** %1) ret i32 0 } \ No newline at end of file diff --git a/test/test_suite/initializer_lists/general_tests.c3t b/test/test_suite/initializer_lists/general_tests.c3t index f100e0476..1f90bce5e 100644 --- a/test/test_suite/initializer_lists/general_tests.c3t +++ b/test/test_suite/initializer_lists/general_tests.c3t @@ -38,14 +38,14 @@ fn int test() %"int[]" = type { i32*, i64 } %"Bar[]" = type { %Bar*, i64 } -@.typeid.general_tests.Baz = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.general_tests.Bar = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$general_tests_Baz" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$general_tests_Bar" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant { i32, [4 x i8] } { i32 1, [4 x i8] undef }, align 8 -@test.foo1 = internal unnamed_addr global i32 22, align 4 +@"test$foo1" = internal unnamed_addr global i32 22, align 4 @.str = private unnamed_addr constant [7 x i8] c"Hello!\00", align 1 ; Function Attrs: nounwind -define i32 @general_tests.test() #0 { +define i32 @general_tests_test() #0 { entry: %ffe = alloca %Baz, align 8 %azz = alloca [1 x i32], align 4 diff --git a/test/test_suite/initializer_lists/ranges_to_dynamic.c3t b/test/test_suite/initializer_lists/ranges_to_dynamic.c3t index 59ef333b8..0d2c6d41a 100644 --- a/test/test_suite/initializer_lists/ranges_to_dynamic.c3t +++ b/test/test_suite/initializer_lists/ranges_to_dynamic.c3t @@ -19,7 +19,7 @@ fn void main() /* #expect: test.ll -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %y = alloca [10 x i32], align 16 %anon = alloca i64, align 8 diff --git a/test/test_suite/initializer_lists/statics.c3t b/test/test_suite/initializer_lists/statics.c3t index 1a43a9687..6f906bd51 100644 --- a/test/test_suite/initializer_lists/statics.c3t +++ b/test/test_suite/initializer_lists/statics.c3t @@ -35,13 +35,13 @@ fn int main() %Bar = type { i32, i32 } %"Bar[]" = type { %Bar*, i64 } -@.typeid.statics.Baz = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.statics.Bar = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$statics_Baz" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$statics_Bar" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.taddr = private global [1 x %Bar] [%Bar { i32 1, i32 2 }], align 8 -@test.c = internal unnamed_addr global %"Bar[]" { %Bar* getelementptr inbounds ([1 x %Bar], [1 x %Bar]* @.taddr, i32 0, i32 0), i64 1 }, align 8 +@"test$c" = internal unnamed_addr global %"Bar[]" { %Bar* getelementptr inbounds ([1 x %Bar], [1 x %Bar]* @.taddr, i32 0, i32 0), i64 1 }, align 8 @.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 -define void @statics.test() #0 { +define void @statics_test() #0 { entry: %b = alloca %"Bar[]", align 8 %literal = alloca [1 x %Bar], align 4 @@ -59,7 +59,7 @@ entry: %ptroffset = getelementptr inbounds %Bar, %Bar* %7, i64 0 %8 = getelementptr inbounds %Bar, %Bar* %ptroffset, i32 0, i32 1 %9 = load i32, i32* %8, align 4 - %10 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @test.c, i32 0, i32 0), align 8 + %10 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @"test$c", i32 0, i32 0), align 8 %ptroffset1 = getelementptr inbounds %Bar, %Bar* %10, i64 0 %11 = getelementptr inbounds %Bar, %Bar* %ptroffset1, i32 0, i32 1 %12 = load i32, i32* %11, align 4 @@ -71,7 +71,7 @@ entry: %17 = load i32, i32* %16, align 4 %add = add i32 %17, 1 store i32 %add, i32* %16, align 4 - %18 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @test.c, i32 0, i32 0), align 8 + %18 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @"test$c", i32 0, i32 0), align 8 %ptroffset3 = getelementptr inbounds %Bar, %Bar* %18, i64 0 %19 = getelementptr inbounds %Bar, %Bar* %ptroffset3, i32 0, i32 1 %20 = load i32, i32* %19, align 4 @@ -80,12 +80,13 @@ entry: ret void } +; Function Attrs: nounwind define i32 @main() #0 { entry: - call void @statics.test() - call void @statics.test() - call void @statics.test() + call void @statics_test() + call void @statics_test() + call void @statics_test() ret i32 1 } -declare i32 @printf(i8*, ...) \ No newline at end of file +declare i32 @printf(i8*, ...) diff --git a/test/test_suite/initializer_lists/subarrays.c3t b/test/test_suite/initializer_lists/subarrays.c3t index 88cce40e7..d5351dbca 100644 --- a/test/test_suite/initializer_lists/subarrays.c3t +++ b/test/test_suite/initializer_lists/subarrays.c3t @@ -51,14 +51,14 @@ fn int main() %"int[]" = type { i32*, i64 } %Baz = type { double } -@.typeid.subarrays.Baz = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.subarrays.Bar = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$subarrays_Baz" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$subarrays_Bar" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.taddr = private global [2 x %Bar] [%Bar { i32 3, i32 4 }, %Bar { i32 8, i32 9 }], align 8 -@subarrays.arrbar = local_unnamed_addr global %"Bar[]" { %Bar* getelementptr inbounds ([2 x %Bar], [2 x %Bar]* @.taddr, i32 0, i32 0), i64 2 }, align 8 +@subarrays_arrbar = local_unnamed_addr global %"Bar[]" { %Bar* getelementptr inbounds ([2 x %Bar], [2 x %Bar]* @.taddr, i32 0, i32 0), i64 2 }, align 8 @.taddr.3 = private global [2 x i32] [i32 1, i32 2], align 4 -@subarrays.xd = local_unnamed_addr global %"int[]" { i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.taddr.3, i32 0, i32 0), i64 2 }, align 8 +@subarrays_xd = local_unnamed_addr global %"int[]" { i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.taddr.3, i32 0, i32 0), i64 2 }, align 8 @.taddr.4 = private global [2 x i32] [i32 3, i32 4], align 4 -@subarrays.fofeo = local_unnamed_addr global i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.taddr.4, i32 0, i32 0), align 8 +@subarrays_fofeo = local_unnamed_addr global i32* getelementptr inbounds ([2 x i32], [2 x i32]* @.taddr.4, i32 0, i32 0), align 8 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.5 = private unnamed_addr constant [7 x i8] c"Start:\00", align 1 @.str.6 = private unnamed_addr constant [26 x i8] c"X len: %d mid element %d\0A\00", align 1 @@ -66,7 +66,7 @@ fn int main() @.str.8 = private unnamed_addr constant [25 x i8] c"Fofeo second element %d\0A\00", align 1 @.__const = private unnamed_addr constant { i32, [4 x i8] } { i32 1, [4 x i8] undef }, align 8 @.str.9 = private unnamed_addr constant [3 x i8] c"Ok\00", align 1 - +; Function Attrs: nounwind define i32 @main() #0 { entry: %w = alloca %Bar, align 4 @@ -86,12 +86,12 @@ entry: %foo = alloca %"Bar[]", align 8 %literal9 = alloca [0 x %Bar], align 4 %baz = alloca [3 x %Baz], align 16 - %0 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @subarrays.arrbar, i32 0, i32 0), align 8 + %0 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @subarrays_arrbar, i32 0, i32 0), align 8 %ptroffset = getelementptr inbounds %Bar, %Bar* %0, i64 1 %1 = bitcast %Bar* %w to i8* %2 = bitcast %Bar* %ptroffset to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %1, i8* align 4 %2, i32 8, i1 false) - %3 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @subarrays.arrbar, i32 0, i32 0), align 8 + %3 = load %Bar*, %Bar** getelementptr inbounds (%"Bar[]", %"Bar[]"* @subarrays_arrbar, i32 0, i32 0), align 8 %ptroffset1 = getelementptr inbounds %Bar, %Bar* %3, i64 1 %4 = getelementptr inbounds %Bar, %Bar* %ptroffset1, i32 0, i32 0 %5 = load i32, i32* %4, align 4 @@ -114,7 +114,7 @@ entry: store i32 567, i32* %15, align 4 %ptrptr = bitcast [3 x i32]* %literal2 to i32* store i32* %ptrptr, i32** %y, align 8 - %16 = call i32 @"std::io.println"(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0)) #3 + %16 = call i32 @std_io_println(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0)) #3 %17 = getelementptr inbounds %"int[]", %"int[]"* %x, i32 0, i32 1 %18 = load i64, i64* %17, align 8 %uisitrunc = trunc i64 %18 to i32 @@ -127,7 +127,7 @@ entry: %ptroffset4 = getelementptr inbounds i32, i32* %23, i64 1 %24 = load i32, i32* %ptroffset4, align 4 %25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i32 0, i32 0), i32 %24) - %26 = load i32*, i32** @subarrays.fofeo, align 8 + %26 = load i32*, i32** @subarrays_fofeo, align 8 %ptroffset5 = getelementptr inbounds i32, i32* %26, i64 1 %27 = load i32, i32* %ptroffset5, align 4 %28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i32 0, i32 0), i32 %27) @@ -152,11 +152,9 @@ entry: %40 = trunc i8 %39 to i1 %not7 = xor i1 %40, true br i1 %not7, label %if.then, label %if.exit - if.then: ; preds = %entry - %41 = call i32 @"std::io.println"(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0)) #3 + %41 = call i32 @std_io_println(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0)) #3 br label %if.exit - if.exit: ; preds = %if.then, %entry %42 = getelementptr inbounds %Bar, %Bar* %b, i32 0, i32 0 store i32 0, i32* %42, align 4 diff --git a/test/test_suite/initializer_lists/zero_init.c3t b/test/test_suite/initializer_lists/zero_init.c3t index b55a954c7..4717d3c94 100644 --- a/test/test_suite/initializer_lists/zero_init.c3t +++ b/test/test_suite/initializer_lists/zero_init.c3t @@ -35,7 +35,7 @@ fn int test() %Bar = type { i32, i32 } %Baz = type { double } -define i32 @zero_init.test() #0 { +define i32 @zero_init_test() #0 { entry: %m = alloca %Mega, align 4 %azz = alloca [1 x i32], align 4 diff --git a/test/test_suite/literals/literal_general.c3t b/test/test_suite/literals/literal_general.c3t index 377c6096e..d623f4585 100644 --- a/test/test_suite/literals/literal_general.c3t +++ b/test/test_suite/literals/literal_general.c3t @@ -12,11 +12,11 @@ uint foo = '謝'; /* #expect: foo.ll -@foo.aa = local_unnamed_addr global i32 228, align 4 -@foo.x = local_unnamed_addr global i32 1094861636, align 4 -@foo.y = local_unnamed_addr global i32 1214606447, align 4 -@foo.z = local_unnamed_addr global i16 12594, align 2 -@foo.d = local_unnamed_addr global i32 49, align 4 -@foo.b = local_unnamed_addr global i8 64, align 1 -@foo.abc = local_unnamed_addr global i32 322052779, align 4 -@foo.foo = local_unnamed_addr global i32 35613, align 4 +@foo_aa = local_unnamed_addr global i32 228, align 4 +@foo_x = local_unnamed_addr global i32 1094861636, align 4 +@foo_y = local_unnamed_addr global i32 1214606447, align 4 +@foo_z = local_unnamed_addr global i16 12594, align 2 +@foo_d = local_unnamed_addr global i32 49, align 4 +@foo_b = local_unnamed_addr global i8 64, align 1 +@foo_abc = local_unnamed_addr global i32 322052779, align 4 +@foo_foo = local_unnamed_addr global i32 35613, align 4 diff --git a/test/test_suite/macros/macro_body_defer.c3t b/test/test_suite/macros/macro_body_defer.c3t index 0da402404..1d855aafb 100644 --- a/test/test_suite/macros/macro_body_defer.c3t +++ b/test/test_suite/macros/macro_body_defer.c3t @@ -49,14 +49,14 @@ fn void! main() /* #expect: foo.ll -define i64 @foo.foo(i32* %0) #0 { +define i64 @foo_foo(i32* %0) #0 { entry: %reterr = alloca i64, align 8 store i32 1, i32* %0, align 4 ret i64 0 } -define i64 @foo.main() #0 { +define i64 @foo_main() #0 { entry: %i = alloca i32, align 4 %i1 = alloca i32, align 4 @@ -104,7 +104,7 @@ loop.exit4: ; No predecessors! ; Function Attrs: nounwind define i32 @main(i32 %0, i8** %1) #0 { entry: - %2 = call i64 @foo.main() + %2 = call i64 @foo_main() %not_err = icmp eq i64 %2, 0 br i1 %not_err, label %after.errcheck, label %error_block diff --git a/test/test_suite/macros/macro_common.c3t b/test/test_suite/macros/macro_common.c3t index 3db78222a..1d477bde1 100644 --- a/test/test_suite/macros/macro_common.c3t +++ b/test/test_suite/macros/macro_common.c3t @@ -14,7 +14,7 @@ fn void test2() /* #expect: test.ll -define void @test.test2() #0 { +define void @test_test2() #0 { entry: %x = alloca i32, align 4 %blockret = alloca double, align 8 diff --git a/test/test_suite/macros/macro_defer_exit.c3t b/test/test_suite/macros/macro_defer_exit.c3t index 17d2d7295..27506384a 100644 --- a/test/test_suite/macros/macro_defer_exit.c3t +++ b/test/test_suite/macros/macro_defer_exit.c3t @@ -20,7 +20,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %blockret = alloca i32, align 4 diff --git a/test/test_suite/macros/macro_defer_scope.c3t b/test/test_suite/macros/macro_defer_scope.c3t index 59b8b9302..9fa2788a2 100644 --- a/test/test_suite/macros/macro_defer_scope.c3t +++ b/test/test_suite/macros/macro_defer_scope.c3t @@ -18,7 +18,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %blockret = alloca i32, align 4 diff --git a/test/test_suite/macros/macro_defer_with_body.c3t b/test/test_suite/macros/macro_defer_with_body.c3t index 2cb71134c..bf7698fc3 100644 --- a/test/test_suite/macros/macro_defer_with_body.c3t +++ b/test/test_suite/macros/macro_defer_with_body.c3t @@ -21,7 +21,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %a = alloca i32, align 4 diff --git a/test/test_suite/macros/macro_failable_return_rethrow.c3t b/test/test_suite/macros/macro_failable_return_rethrow.c3t index bef481a2a..9a80f813d 100644 --- a/test/test_suite/macros/macro_failable_return_rethrow.c3t +++ b/test/test_suite/macros/macro_failable_return_rethrow.c3t @@ -16,13 +16,13 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %error_var = alloca i64, align 8 %blockret = alloca i32, align 4 %error_var1 = alloca i64, align 8 %retparam = alloca i32, align 4 - %0 = call i64 @test.xy(i32* %retparam) + %0 = call i64 @test_xy(i32* %retparam) %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %error diff --git a/test/test_suite/macros/macro_import_res_private.c3t b/test/test_suite/macros/macro_import_res_private.c3t index a5f6bce35..95bfa9cd3 100644 --- a/test/test_suite/macros/macro_import_res_private.c3t +++ b/test/test_suite/macros/macro_import_res_private.c3t @@ -19,8 +19,8 @@ fn void test() /* #expect: baz.ll -define void @baz.test() #0 { +define void @baz_test() #0 { entry: - call void @foo.foo1() + call void @foo_foo1() ret void } \ No newline at end of file diff --git a/test/test_suite/macros/macro_nested_labels.c3t b/test/test_suite/macros/macro_nested_labels.c3t index 094f3a6ae..40f919364 100644 --- a/test/test_suite/macros/macro_nested_labels.c3t +++ b/test/test_suite/macros/macro_nested_labels.c3t @@ -28,7 +28,7 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %ab = alloca i32, align 4 %x = alloca i32, align 4 diff --git a/test/test_suite/macros/macro_with_body.c3t b/test/test_suite/macros/macro_with_body.c3t index fbe8ce7af..71f2dfc8e 100644 --- a/test/test_suite/macros/macro_with_body.c3t +++ b/test/test_suite/macros/macro_with_body.c3t @@ -45,8 +45,7 @@ fn void main() /* #expect: withbody.ll - -define i32 @withbody.Foo__mutate(%Foo* %0) #0 { +define i32 @withbody_Foo_mutate(%Foo* %0) #0 { entry: %1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0)) %2 = getelementptr inbounds %Foo, %Foo* %0, i32 0, i32 0 @@ -57,7 +56,7 @@ entry: ret i32 %mul } -define void @withbody.main() #0 { +define void @withbody_main() #0 { entry: %f = alloca %Foo, align 4 %y = alloca i32, align 4 @@ -75,7 +74,7 @@ entry: %2 = getelementptr inbounds %Foo, %Foo* %foo, i32 0, i32 0 %3 = load i32, i32* %2, align 4 store i32 %3, i32* %y, align 4 - %4 = call i32 @withbody.Foo__mutate(%Foo* %foo) + %4 = call i32 @withbody_Foo_mutate(%Foo* %foo) store i32 %4, i32* %x, align 4 %5 = load i32, i32* %y, align 4 store i32 %5, i32* %dy, align 4 diff --git a/test/test_suite/macros/userland_bitcast.c3t b/test/test_suite/macros/userland_bitcast.c3t index 589b9f868..2b2f9e441 100644 --- a/test/test_suite/macros/userland_bitcast.c3t +++ b/test/test_suite/macros/userland_bitcast.c3t @@ -78,11 +78,11 @@ fn void main() %Foo = type { i16, i8, i8, i16, i16 } -@.typeid.userland_bitcast.Foo = linkonce constant { i8, i64 } { i8 10, i64 5 }, align 8 +@"ct$userland_bitcast_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 5, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [16 x i8] c"%f => %d => %f\0A\00", align 1 @.str.1 = private unnamed_addr constant [18 x i8] c"%e => %llu => %e\0A\00", align 1 -define i64 @userland_bitcast.testFoo(i16 signext %0) #0 { +define i64 @userland_bitcast_testFoo(i16 signext %0) #0 { entry: %z = alloca %Foo, align 2 %expr = alloca %Foo, align 2 @@ -135,7 +135,8 @@ loop.exit: ; preds = %loop.cond ret i64 %15 } -define i32 @userland_bitcast.test(float %0) #0 { +; Function Attrs: nounwind +define i32 @userland_bitcast_test(float %0) #0 { entry: %expr = alloca float, align 4 %x = alloca [4 x i8], align 1 @@ -178,7 +179,8 @@ loop.exit: ; preds = %loop.cond ret i32 %10 } -define void @userland_bitcast.main() #0 { +; Function Attrs: nounwind +define void @userland_bitcast_main() #0 { entry: %f = alloca float, align 4 %i = alloca i32, align 4 diff --git a/test/test_suite/methods/enum_distinct_err_methods.c3t b/test/test_suite/methods/enum_distinct_err_methods.c3t index e2daef729..fa30379b2 100644 --- a/test/test_suite/methods/enum_distinct_err_methods.c3t +++ b/test/test_suite/methods/enum_distinct_err_methods.c3t @@ -41,23 +41,23 @@ fn int main() return 0; } -// #expect: foo.ll +/* #expect: foo.ll -define void @foo.Foo__hello(i64* %0) #0 { +define void @foo_Foo_hello(i64* %0) #0 { entry: - %1 = call i32 @"std::io.println"(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0)) #1 + %1 = call i32 @std_io_println(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0)) #1 ret void } -define void @foo.Bar__hello(i32* %0) #0 { +define void @foo_Bar_hello(i32* %0) #0 { entry: - %1 = call i32 @"std::io.println"(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0)) #1 + %1 = call i32 @std_io_println(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0)) #1 ret void } -define void @foo.MyEnum__hello(i32* %0) #0 { +define void @foo_MyEnum_hello(i32* %0) #0 { entry: - %1 = call i32 @"std::io.println"(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i32 0, i32 0)) #1 + %1 = call i32 @std_io_println(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i32 0, i32 0)) #1 ret void } @@ -69,8 +69,8 @@ entry: 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(i64* %f) - call void @foo.Bar__hello(i32* %b) - call void @foo.MyEnum__hello(i32* %a) + call void @foo_Foo_hello(i64* %f) + call void @foo_Bar_hello(i32* %b) + call void @foo_MyEnum_hello(i32* %a) ret i32 0 } diff --git a/test/test_suite/methods/extension_method.c3t b/test/test_suite/methods/extension_method.c3t index 2b87b4a01..c1a3a9a02 100644 --- a/test/test_suite/methods/extension_method.c3t +++ b/test/test_suite/methods/extension_method.c3t @@ -33,7 +33,7 @@ entry: %bar = alloca %Bar, align 4 %0 = bitcast %Bar* %bar to i32* store i32 0, i32* %0, align 4 - call void @foo.Bar__test(%Bar* %bar) + call void @foo_Bar_test(%Bar* %bar) ret i32 0 -declare void @foo.Bar__test(%Bar*) +declare void @foo_Bar_test(%Bar*) diff --git a/test/test_suite/methods/extension_method_in_other_modules.c3t b/test/test_suite/methods/extension_method_in_other_modules.c3t index 8d5292b5c..771549b60 100644 --- a/test/test_suite/methods/extension_method_in_other_modules.c3t +++ b/test/test_suite/methods/extension_method_in_other_modules.c3t @@ -20,24 +20,24 @@ fn void main() /* #expect: foob.ll -define void @foob.Foo__test(%Foo* %0) #0 { +define void @foob_Foo_test(%Foo* %0) #0 { entry: ret void } // #expect: baz.ll -define void @foob.Foo__test2(%Foo* %0, i32 %1) #0 { +define void @foob_Foo_test2(%Foo* %0, i32 %1) #0 { entry: ret void } -define void @baz.main() #0 { +define void @baz_main() #0 { entry: %f = alloca %Foo, align 4 %0 = bitcast %Foo* %f to i32* store i32 0, i32* %0, align 4 - call void @foob.Foo__test(%Foo* %f) - call void @foob.Foo__test2(%Foo* %f, i32 123) + call void @foob_Foo_test(%Foo* %f) + call void @foob_Foo_test2(%Foo* %f, i32 123) ret void } diff --git a/test/test_suite/pointers/array_pointer_decay.c3t b/test/test_suite/pointers/array_pointer_decay.c3t index add67aa71..b0000123a 100644 --- a/test/test_suite/pointers/array_pointer_decay.c3t +++ b/test/test_suite/pointers/array_pointer_decay.c3t @@ -20,7 +20,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca [3 x i32]*, align 8 diff --git a/test/test_suite/pointers/const_pointer.c3t b/test/test_suite/pointers/const_pointer.c3t index 3e51b279c..3bbc0fa69 100644 --- a/test/test_suite/pointers/const_pointer.c3t +++ b/test/test_suite/pointers/const_pointer.c3t @@ -10,7 +10,7 @@ private void*[3] data = { &foo, &bar, &xx }; /* #expect: const_pointer.ll -@const_pointer.foo = protected global double 1.700000e+01, align 8 -@const_pointer.bar = protected global double 1.200000e+01, align 8 -@const_pointer.xx = protected global float 1.200000e+01, align 4 -@const_pointer.data = protected unnamed_addr global [3 x i8*] [i8* bitcast (double* @const_pointer.foo to i8*), i8* bitcast (double* @const_pointer.bar to i8*), i8* bitcast (float* @const_pointer.xx to i8*)], align 16 +@const_pointer_foo = protected global double 1.700000e+01, align 8 +@const_pointer_bar = protected global double 1.200000e+01, align 8 +@const_pointer_xx = protected global float 1.200000e+01, align 4 +@const_pointer_data = protected unnamed_addr global [3 x i8*] [i8* bitcast (double* @const_pointer_foo to i8*), i8* bitcast (double* @const_pointer_bar to i8*), i8* bitcast (float* @const_pointer_xx to i8*)], align 16 diff --git a/test/test_suite/pointers/pointer_index.c3t b/test/test_suite/pointers/pointer_index.c3t index 6526fef1e..13b7aa314 100644 --- a/test/test_suite/pointers/pointer_index.c3t +++ b/test/test_suite/pointers/pointer_index.c3t @@ -24,7 +24,7 @@ fn void test3(long* x) // #expect: pointer_index.ll -define void @pointer_index.test1(i32* %0) #0 { +define void @pointer_index_test1(i32* %0) #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 @@ -45,7 +45,7 @@ entry: } ; Function Attrs: nounwind -define void @pointer_index.test2(i8* %0) #0 { +define void @pointer_index_test2(i8* %0) #0 { entry: %a = alloca i8, align 1 %b = alloca i8, align 1 @@ -61,7 +61,7 @@ entry: ret void } -define void @pointer_index.test3(i64* %0) #0 { +define void @pointer_index_test3(i64* %0) #0 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 diff --git a/test/test_suite/pointers/subarray_variant_to_ptr.c3t b/test/test_suite/pointers/subarray_variant_to_ptr.c3t index 3547655cf..6b9841930 100644 --- a/test/test_suite/pointers/subarray_variant_to_ptr.c3t +++ b/test/test_suite/pointers/subarray_variant_to_ptr.c3t @@ -29,9 +29,9 @@ fn void main() %variant = type { i8*, i64 } %"int[]" = type { i32*, i64 } -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test1(i64 %0, i8* %1) #0 { +define void @foo_test1(i64 %0, i8* %1) #0 { entry: %z = alloca %variant, align 8 %w = alloca i32*, align 8 @@ -50,7 +50,8 @@ entry: ret void } -define void @foo.test2(i8* %0, i64 %1) #0 { +; Function Attrs: nounwind +define void @foo_test2(i8* %0, i64 %1) #0 { entry: %z = alloca %"int[]", align 8 %w = alloca i32*, align 8 @@ -68,7 +69,8 @@ entry: ret void } -define void @foo.main() #0 { +; Function Attrs: nounwind +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 @@ -81,14 +83,14 @@ entry: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %0, i8* align 4 bitcast ([2 x i32]* @.__const to i8*), i32 8, i1 false) %1 = bitcast i32* %x to i8* %2 = insertvalue %variant undef, i8* %1, 0 - %3 = insertvalue %variant %2, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %3 = insertvalue %variant %2, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %3, %variant* %taddr, align 8 %4 = bitcast %variant* %taddr to { i64, i8* }* %5 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %4, i32 0, i32 0 %lo = load i64, i64* %5, align 8 %6 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %4, i32 0, i32 1 %hi = load i8*, i8** %6, align 8 - call void @foo.test1(i64 %lo, i8* %hi) + call void @foo_test1(i64 %lo, i8* %hi) %7 = getelementptr inbounds [2 x i32], [2 x i32]* %w, i64 0, i64 0 %8 = insertvalue %"int[]" undef, i32* %7, 0 %9 = insertvalue %"int[]" %8, i64 2, 1 @@ -98,6 +100,6 @@ entry: %lo2 = load i8*, i8** %11, align 8 %12 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %10, i32 0, i32 1 %hi3 = load i64, i64* %12, align 8 - call void @foo.test2(i8* %lo2, i64 %hi3) + call void @foo_test2(i8* %lo2, i64 %hi3) ret void } \ No newline at end of file diff --git a/test/test_suite/safe/deref.c3t b/test/test_suite/safe/deref.c3t index b6a15156d..8f9f67faa 100644 --- a/test/test_suite/safe/deref.c3t +++ b/test/test_suite/safe/deref.c3t @@ -9,7 +9,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32*, align 8 %y = alloca i32, align 4 @@ -19,7 +19,7 @@ entry: br i1 %checknull, label %panic, label %checkok panic: ; preds = %entry - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.zstr, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.zstr.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.zstr.2, i64 0, i64 0), i32 6) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.zstr, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.zstr.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.zstr.2, i64 0, i64 0), i32 6) br label %checkok checkok: ; preds = %panic, %entry diff --git a/test/test_suite/slices/slice_assign.c3t b/test/test_suite/slices/slice_assign.c3t index 665f0d5f3..014caa2e7 100644 --- a/test/test_suite/slices/slice_assign.c3t +++ b/test/test_suite/slices/slice_assign.c3t @@ -18,7 +18,7 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %x = alloca [8 x i32], align 16 %anon = alloca i64, align 8 diff --git a/test/test_suite/statements/comparison_widening.c3t b/test/test_suite/statements/comparison_widening.c3t index c3bab6bf0..65b9ce45f 100644 --- a/test/test_suite/statements/comparison_widening.c3t +++ b/test/test_suite/statements/comparison_widening.c3t @@ -10,7 +10,7 @@ fn void test1() // #expect: comparison_widening.ll -define void @comparison_widening.test1() #0 { +define void @comparison_widening_test1() #0 { entry: %a = alloca i8, align 1 %b = alloca i32, align 4 diff --git a/test/test_suite/statements/custom_foreach_with_ref.c3t b/test/test_suite/statements/custom_foreach_with_ref.c3t index dce61961d..93df7c612 100644 --- a/test/test_suite/statements/custom_foreach_with_ref.c3t +++ b/test/test_suite/statements/custom_foreach_with_ref.c3t @@ -83,10 +83,9 @@ fn void main() /* #expect: foo.ll - %Foo = type { [3 x i32] } -@.typeid.foo.Foo = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 +@"ct$foo_Foo" = linkonce constant %.introspect { i8 10, i64 12, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [11 x i8] c"getFields\0A\00", align 1 @.str.1 = private unnamed_addr constant [11 x i8] c"Call made\0A\00", align 1 @.__const = private unnamed_addr constant %Foo { [3 x i32] [i32 1, i32 5, i32 7] }, align 4 @@ -103,7 +102,7 @@ fn void main() @.str.12 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.13 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 -define void @foo.getFields([5 x i32]* noalias sret([5 x i32]) align 4 %0) #0 { +define void @foo_getFields([5 x i32]* noalias sret([5 x i32]) align 4 %0) #0 { entry: %literal = alloca [5 x i32], align 16 call void (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0)) @@ -122,12 +121,12 @@ entry: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 20, i1 false) ret void } -define %Foo* @foo.call(%Foo* %0) #0 { +define %Foo* @foo_call(%Foo* %0) #0 { entry: call void (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i32 0, i32 0)) ret %Foo* %0 } -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca %Foo, align 4 %a = alloca i32, align 4 @@ -201,7 +200,7 @@ entry: %12 = load i32, i32* %11, align 4 call void (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i32 0, i32 0), i32 %4, i32 %8, i32 %12) store i32 0, i32* %anon, align 4 - %13 = call %Foo* @foo.call(%Foo* %x) + %13 = call %Foo* @foo_call(%Foo* %x) store %Foo* %13, %Foo** %anon5, align 8 store i32 3, i32* %anon6, align 4 br label %loop.cond @@ -390,7 +389,7 @@ loop.body58: ; preds = %loop.cond57 loop.exit63: ; preds = %loop.cond57 store i64 0, i64* %anon64, align 8 - call void @foo.getFields([5 x i32]* sret([5 x i32]) align 4 %sretparam) + call void @foo_getFields([5 x i32]* sret([5 x i32]) align 4 %sretparam) %83 = bitcast [5 x i32]* %anon65 to i8* %84 = bitcast [5 x i32]* %sretparam to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 16 %83, i8* align 4 %84, i32 20, i1 false) @@ -418,7 +417,7 @@ loop.body68: ; preds = %loop.cond66 loop.exit72: ; preds = %loop.cond66 store i64 0, i64* %anon73, align 8 - call void @foo.getFields([5 x i32]* sret([5 x i32]) align 4 %sretparam75) + call void @foo_getFields([5 x i32]* sret([5 x i32]) align 4 %sretparam75) store [5 x i32]* %sretparam75, [5 x i32]** %anon74, align 8 br label %loop.cond76 diff --git a/test/test_suite/statements/defer_break.c3t b/test/test_suite/statements/defer_break.c3t index b8dc8b0e1..33eb2c9f6 100644 --- a/test/test_suite/statements/defer_break.c3t +++ b/test/test_suite/statements/defer_break.c3t @@ -51,7 +51,7 @@ define i32 @main(i32 %0, i8** %1) #0 { entry: %a = alloca i32, align 4 store i32 0, i32* %a, align 4 - call void @foo.defer2() + call void @foo_defer2() %2 = load i32, i32* %a, align 4 %eq = icmp eq i32 %2, 1 br i1 %eq, label %if.then, label %if.exit @@ -60,7 +60,7 @@ if.then: ; preds = %entry br label %loop.exit if.exit: ; preds = %entry - call void @foo.defer1() + call void @foo_defer1() br label %loop.exit loop.exit: ; preds = %if.exit, %if.then @@ -76,13 +76,13 @@ loop.body: ; preds = %loop.cond br i1 %eq1, label %if.then2, label %if.exit3 if.then2: ; preds = %loop.body - call void @foo.defer4() + call void @foo_defer4() br label %loop.exit4 if.exit3: ; preds = %loop.body - call void @foo.defer6() - call void @foo.defer5() - call void @foo.defer4() + call void @foo_defer6() + call void @foo_defer5() + call void @foo_defer4() br label %loop.cond loop.exit4: ; preds = %if.then2, %loop.cond @@ -98,17 +98,17 @@ loop.body7: ; preds = %loop.cond5 br i1 %eq8, label %if.then9, label %if.exit10 if.then9: ; preds = %loop.body7 - call void @foo.defer8() + call void @foo_defer8() br label %loop.exit11 if.exit10: ; preds = %loop.body7 - call void @foo.defer10() - call void @foo.defer9() - call void @foo.defer8() + call void @foo_defer10() + call void @foo_defer9() + call void @foo_defer8() br label %loop.exit11 loop.exit11: ; preds = %if.exit10, %if.then9, %loop.cond5 - call void @foo.defer7() - call void @foo.defer3() + call void @foo_defer7() + call void @foo_defer3() ret i32 0 } \ No newline at end of file diff --git a/test/test_suite/statements/defer_break_simple.c3t b/test/test_suite/statements/defer_break_simple.c3t index ab80d5473..d361d72b8 100644 --- a/test/test_suite/statements/defer_break_simple.c3t +++ b/test/test_suite/statements/defer_break_simple.c3t @@ -43,16 +43,16 @@ loop.body: ; preds = %loop.cond br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %loop.body - call void @test.testA() - call void @test.testB() - call void @test.test2() + call void @test_testA() + call void @test_testB() + call void @test_test2() br label %loop.exit if.exit: ; preds = %loop.body - call void @test.test3() - call void @test.testA() - call void @test.testB() - call void @test.test2() + call void @test_test3() + call void @test_testA() + call void @test_testB() + call void @test_test2() br label %loop.cond loop.exit: ; preds = %if.then, %loop.cond diff --git a/test/test_suite/statements/defer_break_switch.c3t b/test/test_suite/statements/defer_break_switch.c3t index c882244a7..76be862d3 100644 --- a/test/test_suite/statements/defer_break_switch.c3t +++ b/test/test_suite/statements/defer_break_switch.c3t @@ -21,7 +21,7 @@ fn void test(int i) /* #expect: defer_break_switch.ll -define void @defer_break_switch.test(i32 %0) #0 { +define void @defer_break_switch_test(i32 %0) #0 { entry: %b = alloca i8, align 1 %switch = alloca i32, align 4 @@ -42,16 +42,16 @@ switch.case: ; preds = %switch.entry br i1 %3, label %if.then, label %if.exit if.then: ; preds = %switch.case - call void @defer_break_switch.test2() + call void @defer_break_switch_test2() br label %switch.exit if.exit: ; preds = %switch.case - call void @defer_break_switch.test1() - call void @defer_break_switch.test2() + call void @defer_break_switch_test1() + call void @defer_break_switch_test2() br label %switch.exit switch.case1: ; preds = %switch.entry - call void @defer_break_switch.test1() + call void @defer_break_switch_test1() br label %switch.exit switch.exit: ; preds = %switch.case1, %if.exit, %if.then, %switch.entry diff --git a/test/test_suite/statements/defer_do_while.c3t b/test/test_suite/statements/defer_do_while.c3t index e3d0c2731..0902d19c7 100644 --- a/test/test_suite/statements/defer_do_while.c3t +++ b/test/test_suite/statements/defer_do_while.c3t @@ -13,7 +13,7 @@ fn void test() /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %a = alloca i32, align 4 store i32 0, i32* %a, align 4 diff --git a/test/test_suite/statements/defer_in_block.c3t b/test/test_suite/statements/defer_in_block.c3t index e6cf3bdb2..f21d4509d 100644 --- a/test/test_suite/statements/defer_in_block.c3t +++ b/test/test_suite/statements/defer_in_block.c3t @@ -28,7 +28,7 @@ fn void main() } /* #expect: foo.ll -define void @foo.test(i32 %0) #0 { +define void @foo_test(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, i32* %x, align 4 diff --git a/test/test_suite/statements/defer_in_defer.c3t b/test/test_suite/statements/defer_in_defer.c3t index 6d9e15b73..e61cfb5ad 100644 --- a/test/test_suite/statements/defer_in_defer.c3t +++ b/test/test_suite/statements/defer_in_defer.c3t @@ -22,17 +22,17 @@ fn void test_line() // #expect: defer_in_defer.ll -define void @defer_in_defer.test() #0 { +define void @defer_in_defer_test() #0 { entry: - call void @defer_in_defer.test4() - call void @defer_in_defer.test2() - call void @defer_in_defer.test3() - call void @defer_in_defer.test1() + call void @defer_in_defer_test4() + call void @defer_in_defer_test2() + call void @defer_in_defer_test3() + call void @defer_in_defer_test1() ret void } -define void @defer_in_defer.test_line() #0 { +define void @defer_in_defer_test_line() #0 { entry: - call void @defer_in_defer.test1() + call void @defer_in_defer_test1() ret void } diff --git a/test/test_suite/statements/defer_in_defer2.c3t b/test/test_suite/statements/defer_in_defer2.c3t index 99ebf4aea..78223bc23 100644 --- a/test/test_suite/statements/defer_in_defer2.c3t +++ b/test/test_suite/statements/defer_in_defer2.c3t @@ -32,7 +32,7 @@ fn void main() /* #expect: test.ll -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, i32* %x, align 4 diff --git a/test/test_suite/statements/defer_next_switch.c3t b/test/test_suite/statements/defer_next_switch.c3t index f26388e5f..f752ba0df 100644 --- a/test/test_suite/statements/defer_next_switch.c3t +++ b/test/test_suite/statements/defer_next_switch.c3t @@ -21,7 +21,7 @@ fn void test(int i) /* #expect: defer_next_switch.ll -define void @defer_next_switch.test(i32 %0) #0 { +define void @defer_next_switch_test(i32 %0) #0 { entry: %b = alloca i8, align 1 %switch = alloca i32, align 4 @@ -42,16 +42,16 @@ switch.case: ; preds = %switch.entry br i1 %3, label %if.then, label %if.exit if.then: ; preds = %switch.case - call void @defer_next_switch.test2() + call void @defer_next_switch_test2() br label %switch.case1 if.exit: ; preds = %switch.case - call void @defer_next_switch.test1() - call void @defer_next_switch.test2() + call void @defer_next_switch_test1() + call void @defer_next_switch_test2() br label %switch.exit switch.case1: ; preds = %switch.entry, %if.then - call void @defer_next_switch.test1() + call void @defer_next_switch_test1() br label %switch.exit switch.exit: ; preds = %switch.case1, %if.exit, %switch.entry diff --git a/test/test_suite/statements/defer_return.c3t b/test/test_suite/statements/defer_return.c3t index 80f738af3..b20533e6f 100644 --- a/test/test_suite/statements/defer_return.c3t +++ b/test/test_suite/statements/defer_return.c3t @@ -54,14 +54,14 @@ loop.body: ; preds = %loop.cond if.then: ; preds = %loop.body %3 = load i32, i32* %a, align 4 %add = add i32 %3, %0 - call void @test.test2() - call void @test.test1() + call void @test_test2() + call void @test_test1() ret i32 %add if.exit: ; preds = %loop.body - call void @test.test4() - call void @test.test3() - call void @test.test2() + call void @test_test4() + call void @test_test3() + call void @test_test2() br label %loop.cond loop.exit: ; preds = %loop.cond @@ -79,22 +79,22 @@ loop.body3: ; preds = %loop.cond1 if.then5: ; preds = %loop.body3 %5 = load i32, i32* %a, align 4 %add6 = add i32 %5, 2 - call void @test.test6() - call void @test.test5() - call void @test.test1() + call void @test_test6() + call void @test_test5() + call void @test_test1() ret i32 %add6 if.exit7: ; preds = %loop.body3 - call void @test.test8() - call void @test.test7() - call void @test.test6() - call void @test.test5() - call void @test.test1() + call void @test_test8() + call void @test_test7() + call void @test_test6() + call void @test_test5() + call void @test_test1() ret i32 4 loop.exit8: ; preds = %loop.cond1 %add9 = add i32 0, %0 - call void @test.test5() - call void @test.test1() + call void @test_test5() + call void @test_test1() ret i32 %add9 } \ No newline at end of file diff --git a/test/test_suite/statements/defer_with_loop.c3t b/test/test_suite/statements/defer_with_loop.c3t index f1b4a2246..67da269ef 100644 --- a/test/test_suite/statements/defer_with_loop.c3t +++ b/test/test_suite/statements/defer_with_loop.c3t @@ -29,7 +29,7 @@ fn void main() /* #expect: test.ll -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %i = alloca i32, align 4 %i4 = alloca i32, align 4 diff --git a/test/test_suite/statements/fallthough_do.c3t b/test/test_suite/statements/fallthough_do.c3t index c3e903dce..d37601048 100644 --- a/test/test_suite/statements/fallthough_do.c3t +++ b/test/test_suite/statements/fallthough_do.c3t @@ -35,41 +35,46 @@ fn void main() /* #expect: foo.ll - -@test.x = internal unnamed_addr global i32 0, align 4 +@"test$x" = internal unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%d, %d\0A\00", align 1 -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 store i32 10, i32* %i, align 4 - %0 = call i32 @foo.test() + %0 = call i32 @foo_test() call void (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %0) %1 = load i32, i32* %i, align 4 - %2 = call i32 @foo.test() + %2 = call i32 @foo_test() call void (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i32 %1, i32 %2) %3 = load i32, i32* %i, align 4 %lt = icmp slt i32 %3, 0 br i1 %lt, label %if.then, label %if.exit + if.then: ; preds = %entry br label %loop.exit + if.exit: ; preds = %entry %4 = load i32, i32* %i, align 4 - %5 = call i32 @foo.test() + %5 = call i32 @foo_test() call void (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i32 %4, i32 %5) br label %loop.exit + loop.exit: ; preds = %if.exit, %if.then %6 = load i32, i32* %i, align 4 %lt1 = icmp slt i32 %6, 0 br i1 %lt1, label %if.then2, label %if.exit3 + if.then2: ; preds = %loop.exit br label %loop.exit4 + if.exit3: ; preds = %loop.exit %7 = load i32, i32* %i, align 4 - %8 = call i32 @foo.test() + %8 = call i32 @foo_test() call void (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i32 %7, i32 %8) br label %loop.exit4 + loop.exit4: ; preds = %if.exit3, %if.then2 ret void } diff --git a/test/test_suite/statements/foreach_break.c3t b/test/test_suite/statements/foreach_break.c3t index 9f735d04a..f44d4153c 100644 --- a/test/test_suite/statements/foreach_break.c3t +++ b/test/test_suite/statements/foreach_break.c3t @@ -15,7 +15,7 @@ fn void test() /* #expect: test.ll -define void @test.test() #0 { +define void @test_test() #0 { entry: %x = alloca [3 x i32], align 4 %g = alloca i32, align 4 diff --git a/test/test_suite/statements/foreach_custom.c3t b/test/test_suite/statements/foreach_custom.c3t index 2fffde686..b730374ef 100644 --- a/test/test_suite/statements/foreach_custom.c3t +++ b/test/test_suite/statements/foreach_custom.c3t @@ -34,7 +34,7 @@ extern fn int printf(char *fmt, ...); /* #expect: foo.ll ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca [3 x i32], align 4 %x = alloca %Foo, align 8 diff --git a/test/test_suite/statements/foreach_custom_macro.c3t b/test/test_suite/statements/foreach_custom_macro.c3t index 046462d2e..3d6a6b006 100644 --- a/test/test_suite/statements/foreach_custom_macro.c3t +++ b/test/test_suite/statements/foreach_custom_macro.c3t @@ -32,7 +32,7 @@ extern fn int printf(char *fmt, ...); /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca [3 x i32], align 4 %x = alloca %Foo, align 8 diff --git a/test/test_suite/statements/if_tests.c3t b/test/test_suite/statements/if_tests.c3t index 823c81db3..153203ad7 100644 --- a/test/test_suite/statements/if_tests.c3t +++ b/test/test_suite/statements/if_tests.c3t @@ -28,7 +28,7 @@ fn void test3(int x) // #expect: iftest.ll -define void @iftest.test1(i32 %0) #0 { +define void @iftest_test1(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, i32* %x, align 4 @@ -46,13 +46,13 @@ if.exit: ; preds = %if.then, %entry ret void } -define void @iftest.test2(i32 %0) #0 { +define void @iftest_test2(i32 %0) #0 { entry: %gt = icmp sgt i32 %0, 0 ret void } -define void @iftest.test3(i32 %0) #0 { +define void @iftest_test3(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, i32* %x, align 4 diff --git a/test/test_suite/statements/labelled_continue_for.c3t b/test/test_suite/statements/labelled_continue_for.c3t index f0afde8b8..5ceb5be9b 100644 --- a/test/test_suite/statements/labelled_continue_for.c3t +++ b/test/test_suite/statements/labelled_continue_for.c3t @@ -24,7 +24,7 @@ fn void testBreak() /* #expect: labelled_continue_for.ll -define void @labelled_continue_for.testBreak() #0 { +define void @labelled_continue_for_testBreak() #0 { entry: %i = alloca i32, align 4 %j = alloca i32, align 4 @@ -50,16 +50,16 @@ loop.cond4: ; preds = %loop.body3 %lt5 = icmp slt i32 %2, 10 br i1 %lt5, label %loop.body6, label %loop.exit loop.body6: ; preds = %loop.cond4 - call void @labelled_continue_for.test() + call void @labelled_continue_for_test() br label %loop.inc loop.exit: ; preds = %loop.cond4 - call void @labelled_continue_for.errored() + call void @labelled_continue_for_errored() %3 = load i32, i32* %j, align 4 %add = add i32 %3, 1 store i32 %add, i32* %j, align 4 br label %loop.cond1 loop.exit7: ; preds = %loop.cond1 - call void @labelled_continue_for.errored() + call void @labelled_continue_for_errored() br label %loop.inc loop.inc: ; preds = %loop.exit7, %loop.body6 %4 = load i32, i32* %i, align 4 diff --git a/test/test_suite/statements/ranged_switch.c3t b/test/test_suite/statements/ranged_switch.c3t index ac5b6d9a7..4b36be425 100644 --- a/test/test_suite/statements/ranged_switch.c3t +++ b/test/test_suite/statements/ranged_switch.c3t @@ -48,7 +48,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 %switch = alloca i32, align 4 diff --git a/test/test_suite/statements/simple_do.c3t b/test/test_suite/statements/simple_do.c3t index 557b26f48..132605831 100644 --- a/test/test_suite/statements/simple_do.c3t +++ b/test/test_suite/statements/simple_do.c3t @@ -27,7 +27,7 @@ fn void main() // #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 store i32 10, i32* %i, align 4 @@ -41,7 +41,7 @@ loop.cond: ; preds = %if.exit br i1 %gt, label %loop.body, label %loop.exit loop.body: ; preds = %loop.cond, %entry - %1 = call i32 @foo.test() + %1 = call i32 @foo_test() call void (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %1) %2 = load i32, i32* %i, align 4 %gt1 = icmp sgt i32 %2, 100 @@ -66,7 +66,7 @@ loop.cond2: ; preds = %if.exit5 loop.body3: ; preds = %loop.cond2, %loop.exit %4 = load i32, i32* %i, align 4 - %5 = call i32 @foo.test() + %5 = call i32 @foo_test() call void (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i32 %4, i32 %5) %6 = load i32, i32* %i, align 4 %smod = srem i32 %6, 3 diff --git a/test/test_suite/statements/various_switching.c3t b/test/test_suite/statements/various_switching.c3t index b662847ac..d9e8e2a28 100644 --- a/test/test_suite/statements/various_switching.c3t +++ b/test/test_suite/statements/various_switching.c3t @@ -68,7 +68,7 @@ fn void main() /* #expect: mymodule.ll -define void @mymodule.test() #0 { +define void @mymodule_test() #0 { entry: %x = alloca i32, align 4 %x.f = alloca i64, align 8 @@ -81,8 +81,8 @@ entry: %zy = alloca i32, align 4 %switch17 = alloca i32, align 4 %switch27 = alloca i8, align 1 - store i64 ptrtoint (i8* @mymodule.ByeErr.BAR to i64), i64* %x.f, align 8 - store i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), i64* %z, align 8 + store i64 ptrtoint (i8* @"mymodule_ByeErr$BAR" to i64), i64* %x.f, align 8 + store i64 ptrtoint (%.introspect* @"ct$int" to i64), i64* %z, align 8 br label %testblock testblock: ; preds = %entry @@ -109,7 +109,7 @@ if.then: ; preds = %end_block switch.entry: ; preds = %if.then %2 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint (i8* @mymodule.HelloErr.FOO to i64), %2 + %eq = icmp eq i64 ptrtoint (i8* @"mymodule_HelloErr$FOO" to i64), %2 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -117,7 +117,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint (i8* @mymodule.ByeErr.BAR to i64), %2 + %eq1 = icmp eq i64 ptrtoint (i8* @"mymodule_ByeErr$BAR" to i64), %2 br i1 %eq1, label %switch.case2, label %next_if3 switch.case2: ; preds = %next_if @@ -141,7 +141,7 @@ if.exit: ; preds = %switch.exit, %end_b switch.entry5: ; preds = %if.exit %4 = load i64, i64* %switch4, align 8 - %eq6 = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), %4 + %eq6 = icmp eq i64 ptrtoint (%.introspect* @"ct$int" to i64), %4 br i1 %eq6, label %switch.case7, label %next_if8 switch.case7: ; preds = %switch.entry5 @@ -149,14 +149,14 @@ switch.case7: ; preds = %switch.entry5 br label %switch.exit16 next_if8: ; preds = %switch.entry5 - %eq9 = icmp eq i64 ptrtoint ({ i8 }* @.typeid.bool to i64), %4 + %eq9 = icmp eq i64 ptrtoint (%.introspect* @"ct$bool" to i64), %4 br i1 %eq9, label %switch.case10, label %next_if11 switch.case10: ; preds = %next_if8 br label %switch.case13 next_if11: ; preds = %next_if8 - %eq12 = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), %4 + %eq12 = icmp eq i64 ptrtoint (%.introspect* @"ct$double" to i64), %4 br i1 %eq12, label %switch.case13, label %next_if14 switch.case13: ; preds = %next_if11, %switch.case10 diff --git a/test/test_suite/strings/literal_to_subarray.c3t b/test/test_suite/strings/literal_to_subarray.c3t index 544ffc55c..15477a67d 100644 --- a/test/test_suite/strings/literal_to_subarray.c3t +++ b/test/test_suite/strings/literal_to_subarray.c3t @@ -11,10 +11,10 @@ fn void test() %"char[]" = type { i8*, i64 } @.str = private unnamed_addr constant [6 x i8] c"hello\00", align 1 -@literal_to_subarray.y = local_unnamed_addr global %"char[]" { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i64 5 }, align 8 +@literal_to_subarray_y = local_unnamed_addr global %"char[]" { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i64 5 }, align 8 @.str.1 = private unnamed_addr constant [6 x i8] c"world\00", align 1 ; Function Attrs: nounwind -define void @literal_to_subarray.test() #0 { +define void @literal_to_subarray_test() #0 { entry: %x = alloca %"char[]", align 8 store %"char[]" { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i64 5 }, %"char[]"* %x, align 8 diff --git a/test/test_suite/strings/string_escape.c3t b/test/test_suite/strings/string_escape.c3t index c5abd11be..404136fa3 100644 --- a/test/test_suite/strings/string_escape.c3t +++ b/test/test_suite/strings/string_escape.c3t @@ -8,7 +8,7 @@ fn void main() @.str = private unnamed_addr constant [18 x i8] c"Hello\00 world! now\00", align 1 -define void @string_escape.main() #0 { +define void @string_escape_main() #0 { entry: %s = alloca i8*, align 8 store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i32 0, i32 0), i8** %s, align 8 @@ -17,6 +17,6 @@ entry: define i32 @main(i32 %0, i8** %1) #0 { entry: - call void @string_escape.main() + call void @string_escape_main() ret i32 0 } \ No newline at end of file diff --git a/test/test_suite/strings/string_len.c3t b/test/test_suite/strings/string_len.c3t index 8d76b2898..e4594a8ea 100644 --- a/test/test_suite/strings/string_len.c3t +++ b/test/test_suite/strings/string_len.c3t @@ -4,4 +4,4 @@ int i = "123".len; /* #expect: string_len.ll -@string_len.i = local_unnamed_addr global i32 3, align 4 \ No newline at end of file +@string_len_i = local_unnamed_addr global i32 3, align 4 \ No newline at end of file diff --git a/test/test_suite/struct/nested_struct_init.c3t b/test/test_suite/struct/nested_struct_init.c3t index 49165fb91..4486f2bcd 100644 --- a/test/test_suite/struct/nested_struct_init.c3t +++ b/test/test_suite/struct/nested_struct_init.c3t @@ -37,24 +37,26 @@ fn void main() %anon.0 = type { float, float, float, float } %Matrix2x2_b = type { %anon.1 } %anon.1 = type { [4 x float] } -@.typeid.foo.anon = linkonce constant { i8, i64 } { i8 10, i64 4 }, align 8 -@.typeid.foo.anon.1 = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.foo.Matrix2x2 = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 -@.typeid.foo.anon.2 = linkonce constant { i8, i64 } { i8 10, i64 4 }, align 8 -@.typeid.foo.anon.3 = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.foo.Matrix2x2_b = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 + +@"ct$foo_anon" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 4, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_anon.3" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_Matrix2x2" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_anon.6" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 4, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_anon.7" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_Matrix2x2_b" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant %Matrix2x2 { %anon { %anon.0 { float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 } } }, align 4 -@.__const.4 = private unnamed_addr constant %Matrix2x2_b { %anon.1 { [4 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00] } }, align 4 +@.__const.8 = private unnamed_addr constant %Matrix2x2_b { %anon.1 { [4 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00] } }, align 4 @.str = private unnamed_addr constant [13 x i8] c"%f %f %f %f\0A\00", align 1 + ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %m = alloca %Matrix2x2, align 4 %m2 = alloca %Matrix2x2_b, align 4 %0 = bitcast %Matrix2x2* %m to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %0, i8* align 4 bitcast (%Matrix2x2* @.__const to i8*), i32 16, i1 false) %1 = bitcast %Matrix2x2_b* %m2 to i8* - call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %1, i8* align 4 bitcast (%Matrix2x2_b* @.__const.4 to i8*), i32 16, i1 false) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %1, i8* align 4 bitcast (%Matrix2x2_b* @.__const.8 to i8*), i32 16, i1 false) %2 = getelementptr inbounds %Matrix2x2, %Matrix2x2* %m, i32 0, i32 0 %3 = bitcast %anon* %2 to %anon.0* %4 = getelementptr inbounds %anon.0, %anon.0* %3, i32 0, i32 0 @@ -78,9 +80,10 @@ entry: %18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), double %fpfpext, double %fpfpext1, double %fpfpext2, double %fpfpext3) ret void } + ; Function Attrs: nounwind define i32 @main(i32 %0, i8** %1) #0 { entry: - call void @foo.main() + call void @foo_main() ret i32 0 } \ No newline at end of file diff --git a/test/test_suite/struct/nested_struct_union_init.c3t b/test/test_suite/struct/nested_struct_union_init.c3t index 67ffafa58..e6a484821 100644 --- a/test/test_suite/struct/nested_struct_union_init.c3t +++ b/test/test_suite/struct/nested_struct_union_init.c3t @@ -62,7 +62,7 @@ fn void main() %anon = type { %anon.0 } %anon.0 = type { float, float, float, float, float, float, float, float, float } -define void @foob.main() #0 { +define void @foob_main() #0 { entry: %x = alloca %Matrix3x3, align 4 %m = alloca %Matrix2x2, align 4 @@ -90,7 +90,7 @@ entry: %11 = bitcast %Matrix2x2* %m to i8* call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %11, i8* align 4 bitcast (%Matrix2x2* @.__const to i8*), i32 16, i1 false) %12 = bitcast %Matrix2x2_b* %m2 to i8* - call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %12, i8* align 4 bitcast (%Matrix2x2_b* @.__const.8 to i8*), i32 16, i1 false) + call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %12, i8* align 4 bitcast (%Matrix2x2_b* @.__const.16 to i8*), i32 16, i1 false) %13 = getelementptr inbounds %Matrix3x3, %Matrix3x3* %x, i32 0, i32 0 %14 = bitcast %anon* %13 to %anon.0* %15 = getelementptr inbounds %anon.0, %anon.0* %14, i32 0, i32 0 diff --git a/test/test_suite/struct/simple_struct.c3t b/test/test_suite/struct/simple_struct.c3t index 07bf821fe..fe64e4641 100644 --- a/test/test_suite/struct/simple_struct.c3t +++ b/test/test_suite/struct/simple_struct.c3t @@ -11,4 +11,4 @@ struct Foo // #expect: test.ll %Foo = type { i32, double } -@test.a = protected unnamed_addr global %Foo zeroinitializer, align 8 \ No newline at end of file +@test_a = protected unnamed_addr global %Foo zeroinitializer, align 8 \ No newline at end of file diff --git a/test/test_suite/struct/struct_as_value.c3t b/test/test_suite/struct/struct_as_value.c3t index 5b7484e93..c5d19f659 100644 --- a/test/test_suite/struct/struct_as_value.c3t +++ b/test/test_suite/struct/struct_as_value.c3t @@ -17,11 +17,11 @@ fn Event test(int x) %Event = type { i32 } -@.typeid.test.Event = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 +@"ct$test_Event" = linkonce constant %.introspect { i8 10, i64 4, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant %Event { i32 1 }, align 4 @.__const.1 = private unnamed_addr constant %Event { i32 2 }, align 4 -define i32 @test.test(i32 %0) #0 { +define i32 @test_test(i32 %0) #0 { entry: %foo = alloca %Event, align 4 %bar = alloca %Event, align 4 @@ -47,4 +47,4 @@ cond.phi: ; preds = %cond.rhs, %cond.lhs %5 = getelementptr inbounds %Event, %Event* %taddr, i32 0, i32 0 %6 = load i32, i32* %5, align 4 ret i32 %6 -} \ No newline at end of file +} diff --git a/test/test_suite/struct/struct_as_value_aarch64.c3t b/test/test_suite/struct/struct_as_value_aarch64.c3t index c2535800d..43ed1c9e9 100644 --- a/test/test_suite/struct/struct_as_value_aarch64.c3t +++ b/test/test_suite/struct/struct_as_value_aarch64.c3t @@ -13,9 +13,9 @@ fn Event test(int x) return x ? foo : bar; } -// #expect: test.ll +/* #expect: test.ll -define i32 @test.test(i32 %0) #0 { +define i32 @test_test(i32 %0) #0 { entry: %foo = alloca %Event, align 4 %bar = alloca %Event, align 4 @@ -41,4 +41,4 @@ cond.phi: ; preds = %cond.rhs, %cond.lhs %5 = getelementptr inbounds %Event, %Event* %taddr, i32 0, i32 0 %6 = load i32, i32* %5, align 4 ret i32 %6 -} +} \ No newline at end of file diff --git a/test/test_suite/struct/struct_codegen.c3t b/test/test_suite/struct/struct_codegen.c3t index 34130abc9..4b2519125 100644 --- a/test/test_suite/struct/struct_codegen.c3t +++ b/test/test_suite/struct/struct_codegen.c3t @@ -16,10 +16,10 @@ fn void test1() %Point = type { i32, i32 } -@.typeid.test.Point = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$test_Point" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant %Point { i32 5, i32 6 }, align 4 -define void @test.test1() #0 { +define void @test_test1() #0 { entry: %p = alloca %Point, align 4 %0 = bitcast %Point* %p to i8* diff --git a/test/test_suite/struct/struct_codegen_fam.c3t b/test/test_suite/struct/struct_codegen_fam.c3t index 3950e63a9..1cb97e9be 100644 --- a/test/test_suite/struct/struct_codegen_fam.c3t +++ b/test/test_suite/struct/struct_codegen_fam.c3t @@ -22,7 +22,7 @@ fn void test(Bar b) %Bar = type { %anon, i32, [0 x i32] } %anon = type { i32 } -define void @foo.test(%Bar* byval(%Bar) align 8 %0) #0 { +define void @foo_test(%Bar* byval(%Bar) align 8 %0) #0 { entry: %b = alloca %Bar, align 4 %1 = bitcast %Bar* %b to i8* diff --git a/test/test_suite/struct/struct_const_construct_simple.c3t b/test/test_suite/struct/struct_const_construct_simple.c3t index 132bd74ff..a20c36d8d 100644 --- a/test/test_suite/struct/struct_const_construct_simple.c3t +++ b/test/test_suite/struct/struct_const_construct_simple.c3t @@ -19,16 +19,15 @@ private const Foo FOO7 = { 1, 2 }; private Foo foo8 = FOO7; /* #expect: structo.ll - %Foo = type { i32, i64 } -@.typeid.structo.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@structo.x = protected unnamed_addr global i64 16, align 8 -@structo.foo1 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 -@structo.foo2 = protected unnamed_addr global %Foo { i32 2, i64 0 }, align 8 -@structo.foo3 = protected unnamed_addr global %Foo { i32 0, i64 3 }, align 8 -@structo.foo4 = protected unnamed_addr global %Foo { i32 4, i64 1 }, align 8 -@structo.foo5 = protected unnamed_addr global %Foo zeroinitializer, align 8 -@structo.foo6 = protected unnamed_addr global %Foo zeroinitializer, align 8 -@structo.FOO7 = protected unnamed_addr constant %Foo { i32 1, i64 2 }, align 8 -@structo.foo8 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 \ No newline at end of file +@"ct$structo_Foo" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@structo_x = protected unnamed_addr global i64 16, align 8 +@structo_foo1 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 +@structo_foo2 = protected unnamed_addr global %Foo { i32 2, i64 0 }, align 8 +@structo_foo3 = protected unnamed_addr global %Foo { i32 0, i64 3 }, align 8 +@structo_foo4 = protected unnamed_addr global %Foo { i32 4, i64 1 }, align 8 +@structo_foo5 = protected unnamed_addr global %Foo zeroinitializer, align 8 +@structo_foo6 = protected unnamed_addr global %Foo zeroinitializer, align 8 +@structo_FOO7 = protected unnamed_addr constant %Foo { i32 1, i64 2 }, align 8 +@structo_foo8 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 diff --git a/test/test_suite/struct/struct_pack_and_align.c3t b/test/test_suite/struct/struct_pack_and_align.c3t index 196f96e7c..3e868d33e 100644 --- a/test/test_suite/struct/struct_pack_and_align.c3t +++ b/test/test_suite/struct/struct_pack_and_align.c3t @@ -69,7 +69,7 @@ struct Foo6 @packed $assert(Foo6.sizeof == 8); Foo6 foo6 = { 1, 2, 3 }; -// #expect: struct2.ll +/* #expect: struct2.ll %Foo1 = type <{ i64, i8, [3 x i8] }> %Foo2 = type <{ i8, i64, [3 x i8] }> @@ -78,14 +78,14 @@ Foo6 foo6 = { 1, 2, 3 }; %Foo5 = type { i32, [12 x i8], i8, [15 x i8] } %Foo6 = type { i32, i16, i16 } -@struct2.foo1 = local_unnamed_addr global %Foo1 <{ i64 1, i8 2, [3 x i8] undef }>, align 4 -@struct2.foo2 = local_unnamed_addr global %Foo2 <{ i8 1, i64 2, [3 x i8] undef }>, align 4 -@struct2.foo3 = local_unnamed_addr global %Foo3 <{ i8 1, i64 2, [7 x i8] undef }>, align 8 -@struct2.foo4 = local_unnamed_addr global %Foo4 <{ i8 1, i64 2 }>, align 1 -@struct2.foo5 = local_unnamed_addr global %Foo5 { i32 1, [12 x i8] undef, i8 2, [15 x i8] undef }, align 16 -@struct2.foo6 = local_unnamed_addr global %Foo6 { i32 1, i16 2, i16 3 }, align 1 +@struct2_foo1 = local_unnamed_addr global %Foo1 <{ i64 1, i8 2, [3 x i8] undef }>, align 4 +@struct2_foo2 = local_unnamed_addr global %Foo2 <{ i8 1, i64 2, [3 x i8] undef }>, align 4 +@struct2_foo3 = local_unnamed_addr global %Foo3 <{ i8 1, i64 2, [7 x i8] undef }>, align 8 +@struct2_foo4 = local_unnamed_addr global %Foo4 <{ i8 1, i64 2 }>, align 1 +@struct2_foo5 = local_unnamed_addr global %Foo5 { i32 1, [12 x i8] undef, i8 2, [15 x i8] undef }, align 16 +@struct2_foo6 = local_unnamed_addr global %Foo6 { i32 1, i16 2, i16 3 }, align 1 -@struct2.test5 +define i32 @struct2_test5(i8 signext %0) #0 { entry: %y = alloca %Foo5, align 16 %1 = bitcast %Foo5* %y to i8* diff --git a/test/test_suite/subarrays/slice_comparison.c3t b/test/test_suite/subarrays/slice_comparison.c3t index 73707bdc7..1d55c5ff6 100644 --- a/test/test_suite/subarrays/slice_comparison.c3t +++ b/test/test_suite/subarrays/slice_comparison.c3t @@ -33,7 +33,7 @@ fn void main() // #expect: mymodule.ll -define void @mymodule.main() #0 { +define void @mymodule_main() #0 { entry: %y = alloca %"char[]", align 8 %z = alloca %"char[]", align 8 diff --git a/test/test_suite/union/union_codegen_const.c3t b/test/test_suite/union/union_codegen_const.c3t index a211ff248..60582734b 100644 --- a/test/test_suite/union/union_codegen_const.c3t +++ b/test/test_suite/union/union_codegen_const.c3t @@ -13,8 +13,8 @@ Foo i = { .b = 2.3, .a = 23 }; // #expect: test.ll -@test.f = protected unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 -@test.g = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 -@test.h = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 -@test.i = local_unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 +@test_f = protected unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 +@test_g = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 +@test_h = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 +@test_i = local_unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 diff --git a/test/test_suite/union/union_in_struct.c3t b/test/test_suite/union/union_in_struct.c3t index 64b09b4d8..5fb0cd4c5 100644 --- a/test/test_suite/union/union_in_struct.c3t +++ b/test/test_suite/union/union_in_struct.c3t @@ -37,9 +37,9 @@ fn void test(Blend_Map_Entry* foo) %Blend_Map_Entry = type { %vals } %vals = type { [2 x double], [8 x i8] } -@test.foo1 = local_unnamed_addr global { i8, [4 x i8], { i32, [4 x i8] }, i32 } { i8 0, [4 x i8] undef, { i32, [4 x i8] } { i32 3, [4 x i8] undef }, i32 4 }, align 8 -@test.foo2 = local_unnamed_addr global %Foo { i8 0, %anon { double 3.000000e+00 }, i32 4 }, align 8 -@test.a = local_unnamed_addr 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 = local_unnamed_addr global %Blend_Map_Entry { %vals { [2 x double] [double 6.000000e+00, double 7.000000e+00], [8 x i8] undef } }, align 8 -@test.c = local_unnamed_addr 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 = local_unnamed_addr 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_foo1 = local_unnamed_addr global { i8, [4 x i8], { i32, [4 x i8] }, i32 } { i8 0, [4 x i8] undef, { i32, [4 x i8] } { i32 3, [4 x i8] undef }, i32 4 }, align 8 +@test_foo2 = local_unnamed_addr global %Foo { i8 0, %anon { double 3.000000e+00 }, i32 4 }, align 8 +@test_a = local_unnamed_addr 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 = local_unnamed_addr global %Blend_Map_Entry { %vals { [2 x double] [double 6.000000e+00, double 7.000000e+00], [8 x i8] undef } }, align 8 +@test_c = local_unnamed_addr 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 = local_unnamed_addr 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 diff --git a/test/test_suite/variant/variant_assign.c3t b/test/test_suite/variant/variant_assign.c3t index 52d53ea16..ca1189764 100644 --- a/test/test_suite/variant/variant_assign.c3t +++ b/test/test_suite/variant/variant_assign.c3t @@ -58,11 +58,11 @@ fn int main() /* #expect: foo.ll -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 -@.typeid.double = linkonce constant { i8, i16 } { i8 4, i16 64 }, align 2 -@.typeid.bool = linkonce constant { i8 } { i8 1 }, align 1 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$double" = linkonce constant %.introspect { i8 4, i64 8, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$bool" = linkonce constant %.introspect { i8 1, i64 1, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test(i64 %0, i8* %1) #0 { +define void @foo_test(i64 %0, i8* %1) #0 { entry: %z = alloca %variant, align 8 %switch = alloca i64, align 8 @@ -80,7 +80,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (%.introspect* @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -94,7 +94,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq2 = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), %6 + %eq2 = icmp eq i64 ptrtoint (%.introspect* @"ct$double" to i64), %6 br i1 %eq2, label %switch.case3, label %next_if5 switch.case3: ; preds = %next_if @@ -118,7 +118,7 @@ switch.exit: ; preds = %switch.default, %sw ret void } -define void @foo.test2(i64 %0, i8* %1) #0 { +define void @foo_test2(i64 %0, i8* %1) #0 { entry: %y = alloca %variant, align 8 %anon = alloca %variant, align 8 @@ -141,7 +141,7 @@ entry: switch.entry: ; preds = %entry %8 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), %8 + %eq = icmp eq i64 ptrtoint (%.introspect* @"ct$int" to i64), %8 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -152,7 +152,7 @@ switch.case: ; preds = %switch.entry store i32 12, i32* %taddr, align 4 %12 = bitcast i32* %taddr to i8* %13 = insertvalue %variant undef, i8* %12, 0 - %14 = insertvalue %variant %13, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %14 = insertvalue %variant %13, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %14, %variant* %y, align 8 %15 = load i32*, i32** %z, align 8 %16 = load i32, i32* %15, align 8 @@ -160,7 +160,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), %8 + %eq1 = icmp eq i64 ptrtoint (%.introspect* @"ct$double" to i64), %8 br i1 %eq1, label %switch.case2, label %next_if4 switch.case2: ; preds = %next_if @@ -184,7 +184,8 @@ switch.exit: ; preds = %switch.default, %sw ret void } -define void @foo.test3(i64 %0, i8* %1) #0 { +; Function Attrs: nounwind +define void @foo_test3(i64 %0, i8* %1) #0 { entry: %y = alloca %variant, align 8 %anon = alloca %variant, align 8 @@ -206,7 +207,7 @@ entry: switch.entry: ; preds = %entry %8 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), %8 + %eq = icmp eq i64 ptrtoint (%.introspect* @"ct$int" to i64), %8 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -220,7 +221,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), %8 + %eq1 = icmp eq i64 ptrtoint (%.introspect* @"ct$double" to i64), %8 br i1 %eq1, label %switch.case2, label %next_if4 switch.case2: ; preds = %next_if @@ -244,6 +245,7 @@ switch.exit: ; preds = %switch.default, %sw ret void } +; Function Attrs: nounwind define i32 @main() #0 { entry: %taddr = alloca double, align 8 @@ -267,98 +269,99 @@ entry: store double 1.230000e+02, double* %taddr, align 8 %0 = bitcast double* %taddr to i8* %1 = insertvalue %variant undef, i8* %0, 0 - %2 = insertvalue %variant %1, i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), 1 + %2 = insertvalue %variant %1, i64 ptrtoint (%.introspect* @"ct$double" to i64), 1 store %variant %2, %variant* %taddr1, align 8 %3 = bitcast %variant* %taddr1 to { i64, i8* }* %4 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %3, i32 0, i32 0 %lo = load i64, i64* %4, align 8 %5 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %3, i32 0, i32 1 %hi = load i8*, i8** %5, align 8 - call void @foo.test(i64 %lo, i8* %hi) + call void @foo_test(i64 %lo, i8* %hi) store i32 1, i32* %taddr2, align 4 %6 = bitcast i32* %taddr2 to i8* %7 = insertvalue %variant undef, i8* %6, 0 - %8 = insertvalue %variant %7, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %8 = insertvalue %variant %7, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %8, %variant* %taddr3, align 8 %9 = bitcast %variant* %taddr3 to { i64, i8* }* %10 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %9, i32 0, i32 0 %lo4 = load i64, i64* %10, align 8 %11 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %9, i32 0, i32 1 %hi5 = load i8*, i8** %11, align 8 - call void @foo.test(i64 %lo4, i8* %hi5) + call void @foo_test(i64 %lo4, i8* %hi5) store i8 1, i8* %taddr6, align 1 %12 = insertvalue %variant undef, i8* %taddr6, 0 - %13 = insertvalue %variant %12, i64 ptrtoint ({ i8 }* @.typeid.bool to i64), 1 + %13 = insertvalue %variant %12, i64 ptrtoint (%.introspect* @"ct$bool" to i64), 1 store %variant %13, %variant* %taddr7, align 8 %14 = bitcast %variant* %taddr7 to { i64, i8* }* %15 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %14, i32 0, i32 0 %lo8 = load i64, i64* %15, align 8 %16 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %14, i32 0, i32 1 %hi9 = load i8*, i8** %16, align 8 - call void @foo.test(i64 %lo8, i8* %hi9) + call void @foo_test(i64 %lo8, i8* %hi9) store double 1.235000e+02, double* %taddr10, align 8 %17 = bitcast double* %taddr10 to i8* %18 = insertvalue %variant undef, i8* %17, 0 - %19 = insertvalue %variant %18, i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), 1 + %19 = insertvalue %variant %18, i64 ptrtoint (%.introspect* @"ct$double" to i64), 1 store %variant %19, %variant* %taddr11, align 8 %20 = bitcast %variant* %taddr11 to { i64, i8* }* %21 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %20, i32 0, i32 0 %lo12 = load i64, i64* %21, align 8 %22 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %20, i32 0, i32 1 %hi13 = load i8*, i8** %22, align 8 - call void @foo.test2(i64 %lo12, i8* %hi13) + call void @foo_test2(i64 %lo12, i8* %hi13) store i32 1, i32* %taddr14, align 4 %23 = bitcast i32* %taddr14 to i8* %24 = insertvalue %variant undef, i8* %23, 0 - %25 = insertvalue %variant %24, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %25 = insertvalue %variant %24, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %25, %variant* %taddr15, align 8 %26 = bitcast %variant* %taddr15 to { i64, i8* }* %27 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %26, i32 0, i32 0 %lo16 = load i64, i64* %27, align 8 %28 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %26, i32 0, i32 1 %hi17 = load i8*, i8** %28, align 8 - call void @foo.test2(i64 %lo16, i8* %hi17) + call void @foo_test2(i64 %lo16, i8* %hi17) store i8 1, i8* %taddr18, align 1 %29 = insertvalue %variant undef, i8* %taddr18, 0 - %30 = insertvalue %variant %29, i64 ptrtoint ({ i8 }* @.typeid.bool to i64), 1 + %30 = insertvalue %variant %29, i64 ptrtoint (%.introspect* @"ct$bool" to i64), 1 store %variant %30, %variant* %taddr19, align 8 %31 = bitcast %variant* %taddr19 to { i64, i8* }* %32 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %31, i32 0, i32 0 %lo20 = load i64, i64* %32, align 8 %33 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %31, i32 0, i32 1 %hi21 = load i8*, i8** %33, align 8 - call void @foo.test2(i64 %lo20, i8* %hi21) + call void @foo_test2(i64 %lo20, i8* %hi21) store double 1.240000e+02, double* %taddr22, align 8 %34 = bitcast double* %taddr22 to i8* %35 = insertvalue %variant undef, i8* %34, 0 - %36 = insertvalue %variant %35, i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), 1 + %36 = insertvalue %variant %35, i64 ptrtoint (%.introspect* @"ct$double" to i64), 1 store %variant %36, %variant* %taddr23, align 8 %37 = bitcast %variant* %taddr23 to { i64, i8* }* %38 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %37, i32 0, i32 0 %lo24 = load i64, i64* %38, align 8 %39 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %37, i32 0, i32 1 %hi25 = load i8*, i8** %39, align 8 - call void @foo.test3(i64 %lo24, i8* %hi25) + call void @foo_test3(i64 %lo24, i8* %hi25) store i32 2, i32* %taddr26, align 4 %40 = bitcast i32* %taddr26 to i8* %41 = insertvalue %variant undef, i8* %40, 0 - %42 = insertvalue %variant %41, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %42 = insertvalue %variant %41, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %42, %variant* %taddr27, align 8 %43 = bitcast %variant* %taddr27 to { i64, i8* }* %44 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %43, i32 0, i32 0 %lo28 = load i64, i64* %44, align 8 %45 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %43, i32 0, i32 1 %hi29 = load i8*, i8** %45, align 8 - call void @foo.test3(i64 %lo28, i8* %hi29) + call void @foo_test3(i64 %lo28, i8* %hi29) store i8 1, i8* %taddr30, align 1 %46 = insertvalue %variant undef, i8* %taddr30, 0 - %47 = insertvalue %variant %46, i64 ptrtoint ({ i8 }* @.typeid.bool to i64), 1 + %47 = insertvalue %variant %46, i64 ptrtoint (%.introspect* @"ct$bool" to i64), 1 store %variant %47, %variant* %taddr31, align 8 %48 = bitcast %variant* %taddr31 to { i64, i8* }* %49 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %48, i32 0, i32 0 %lo32 = load i64, i64* %49, align 8 %50 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %48, i32 0, i32 1 %hi33 = load i8*, i8** %50, align 8 - call void @foo.test3(i64 %lo32, i8* %hi33) + call void @foo_test3(i64 %lo32, i8* %hi33) ret i32 0 } + diff --git a/test/test_suite/variant/variant_switch.c3t b/test/test_suite/variant/variant_switch.c3t index d60f444de..0de5b2d8e 100644 --- a/test/test_suite/variant/variant_switch.c3t +++ b/test/test_suite/variant/variant_switch.c3t @@ -30,11 +30,11 @@ fn int main() /* #expect: foo.ll -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 -@.typeid.double = linkonce constant { i8, i16 } { i8 4, i16 64 }, align 2 -@.typeid.bool = linkonce constant { i8 } { i8 1 }, align 1 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$double" = linkonce constant %.introspect { i8 4, i64 8, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$bool" = linkonce constant %.introspect { i8 1, i64 1, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test(i64 %0, i8* %1) #0 { +define void @foo_test(i64 %0, i8* %1) #0 { entry: %z = alloca %variant, align 8 %switch = alloca i64, align 8 @@ -52,7 +52,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (%.introspect* @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -68,7 +68,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq2 = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), %6 + %eq2 = icmp eq i64 ptrtoint (%.introspect* @"ct$double" to i64), %6 br i1 %eq2, label %switch.case3, label %next_if5 switch.case3: ; preds = %next_if @@ -91,7 +91,7 @@ switch.default: ; preds = %next_if5 switch.exit: ; preds = %switch.default, %switch.case3, %switch.case %18 = getelementptr inbounds %variant, %variant* %z, i32 0, i32 1 %19 = load i64, i64* %18, align 8 - %eq6 = icmp eq i64 %19, ptrtoint ({ i8, i16 }* @.typeid.int to i64) + %eq6 = icmp eq i64 %19, ptrtoint (%.introspect* @"ct$int" to i64) br i1 %eq6, label %if.then, label %if.exit if.then: ; preds = %switch.exit @@ -118,34 +118,34 @@ entry: store double 1.230000e+02, double* %taddr, align 8 %0 = bitcast double* %taddr to i8* %1 = insertvalue %variant undef, i8* %0, 0 - %2 = insertvalue %variant %1, i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), 1 + %2 = insertvalue %variant %1, i64 ptrtoint (%.introspect* @"ct$double" to i64), 1 store %variant %2, %variant* %taddr1, align 8 %3 = bitcast %variant* %taddr1 to { i64, i8* }* %4 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %3, i32 0, i32 0 %lo = load i64, i64* %4, align 8 %5 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %3, i32 0, i32 1 %hi = load i8*, i8** %5, align 8 - call void @foo.test(i64 %lo, i8* %hi) + call void @foo_test(i64 %lo, i8* %hi) store i32 1, i32* %taddr2, align 4 %6 = bitcast i32* %taddr2 to i8* %7 = insertvalue %variant undef, i8* %6, 0 - %8 = insertvalue %variant %7, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %8 = insertvalue %variant %7, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %8, %variant* %taddr3, align 8 %9 = bitcast %variant* %taddr3 to { i64, i8* }* %10 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %9, i32 0, i32 0 %lo4 = load i64, i64* %10, align 8 %11 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %9, i32 0, i32 1 %hi5 = load i8*, i8** %11, align 8 - call void @foo.test(i64 %lo4, i8* %hi5) + call void @foo_test(i64 %lo4, i8* %hi5) store i8 1, i8* %taddr6, align 1 %12 = insertvalue %variant undef, i8* %taddr6, 0 - %13 = insertvalue %variant %12, i64 ptrtoint ({ i8 }* @.typeid.bool to i64), 1 + %13 = insertvalue %variant %12, i64 ptrtoint (%.introspect* @"ct$bool" to i64), 1 store %variant %13, %variant* %taddr7, align 8 %14 = bitcast %variant* %taddr7 to { i64, i8* }* %15 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %14, i32 0, i32 0 %lo8 = load i64, i64* %15, align 8 %16 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %14, i32 0, i32 1 %hi9 = load i8*, i8** %16, align 8 - call void @foo.test(i64 %lo8, i8* %hi9) + call void @foo_test(i64 %lo8, i8* %hi9) ret i32 0 } diff --git a/test/test_suite/variant/variant_test.c3t b/test/test_suite/variant/variant_test.c3t index 3c2191286..e8d8a7952 100644 --- a/test/test_suite/variant/variant_test.c3t +++ b/test/test_suite/variant/variant_test.c3t @@ -63,17 +63,16 @@ fn void main() /* #expect: foo.ll - %variant = type { i8*, i64 } %"variant[]" = type { %variant*, i64 } -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 -@.typeid.double = linkonce constant { i8, i16 } { i8 4, i16 64 }, align 2 -@.typeid.variant = linkonce constant { i8 } { i8 7 }, align 1 -@".typeid.int*" = linkonce constant { i8, i64 } { i8 19, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64) }, align 8 -@.typeid.bool = linkonce constant { i8 } { i8 1 }, align 1 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$double" = linkonce constant %.introspect { i8 4, i64 8, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$variant" = linkonce constant %.introspect { i8 7, i64 16, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$p$int" = linkonce constant %.introspect { i8 19, i64 8, i64 ptrtoint (%.introspect* @"ct$int" to i64), i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$bool" = linkonce constant %.introspect { i8 1, i64 1, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test(i64 %0, i8* %1) #0 { +define void @foo_test(i64 %0, i8* %1) #0 { entry: %x = alloca %variant, align 8 %switch = alloca i64, align 8 @@ -89,7 +88,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, i64* %switch, align 8 - %eq = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (%.introspect* @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -97,7 +96,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), %6 + %eq1 = icmp eq i64 ptrtoint (%.introspect* @"ct$double" to i64), %6 br i1 %eq1, label %switch.case2, label %next_if3 switch.case2: ; preds = %next_if @@ -105,7 +104,7 @@ switch.case2: ; preds = %next_if br label %switch.exit next_if3: ; preds = %next_if - %eq4 = icmp eq i64 ptrtoint ({ i8 }* @.typeid.variant to i64), %6 + %eq4 = icmp eq i64 ptrtoint (%.introspect* @"ct$variant" to i64), %6 br i1 %eq4, label %switch.case5, label %next_if6 switch.case5: ; preds = %next_if3 @@ -113,7 +112,7 @@ switch.case5: ; preds = %next_if3 br label %switch.exit next_if6: ; preds = %next_if3 - %eq7 = icmp eq i64 ptrtoint ({ i8, i64 }* @".typeid.int*" to i64), %6 + %eq7 = icmp eq i64 ptrtoint (%.introspect* @"ct$p$int" to i64), %6 br i1 %eq7, label %switch.case8, label %next_if9 switch.case8: ; preds = %next_if6 @@ -132,7 +131,7 @@ switch.exit: ; preds = %switch.default, %sw } ; Function Attrs: nounwind -define void @foo.test_all(i8* %0, i64 %1) #0 { +define void @foo_test_all(i8* %0, i64 %1) #0 { entry: %y = alloca %"variant[]", align 8 %anon = alloca i64, align 8 @@ -168,7 +167,7 @@ loop.body: ; preds = %loop.cond %lo = load i64, i64* %14, align 8 %15 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %13, i32 0, i32 1 %hi = load i8*, i8** %15, align 8 - call void @foo.test(i64 %lo, i8* %hi) + call void @foo_test(i64 %lo, i8* %hi) %16 = load i64, i64* %anon, align 8 %add = add i64 %16, 1 store i64 %add, i64* %anon, align 8 @@ -179,7 +178,7 @@ loop.exit: ; preds = %loop.cond } ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca %variant, align 8 %taddr = alloca i32, align 4 @@ -201,12 +200,12 @@ entry: store i32 1, i32* %taddr, align 4 %0 = bitcast i32* %taddr to i8* %1 = insertvalue %variant undef, i8* %0, 0 - %2 = insertvalue %variant %1, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %2 = insertvalue %variant %1, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %2, %variant* %x, align 8 store i32 0, i32* %z, align 4 %3 = bitcast i32* %z to i8* %4 = insertvalue %variant undef, i8* %3, 0 - %5 = insertvalue %variant %4, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %5 = insertvalue %variant %4, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %5, %variant* %y, align 8 %6 = getelementptr inbounds %variant, %variant* %y, i32 0, i32 1 %7 = load i64, i64* %6, align 8 @@ -216,7 +215,7 @@ entry: store i64 %9, i64* %h, align 8 %10 = getelementptr inbounds %variant, %variant* %y, i32 0, i32 1 %11 = load i64, i64* %10, align 8 - %eq = icmp eq i64 %11, ptrtoint ({ i8, i16 }* @.typeid.int to i64) + %eq = icmp eq i64 %11, ptrtoint (%.introspect* @"ct$int" to i64) br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %entry @@ -226,7 +225,7 @@ if.then: ; preds = %entry if.exit: ; preds = %if.then, %entry %12 = getelementptr inbounds %variant, %variant* %x, i32 0, i32 1 %13 = load i64, i64* %12, align 8 - %eq1 = icmp eq i64 %13, ptrtoint ({ i8, i16 }* @.typeid.int to i64) + %eq1 = icmp eq i64 %13, ptrtoint (%.introspect* @"ct$int" to i64) br i1 %eq1, label %if.then2, label %if.exit3 if.then2: ; preds = %if.exit @@ -237,15 +236,15 @@ if.exit3: ; preds = %if.then2, %if.exit store double 1.000000e+00, double* %taddr4, align 8 %14 = bitcast double* %taddr4 to i8* %15 = insertvalue %variant undef, i8* %14, 0 - %16 = insertvalue %variant %15, i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), 1 + %16 = insertvalue %variant %15, i64 ptrtoint (%.introspect* @"ct$double" to i64), 1 store %variant %16, %variant* %y, align 8 %17 = bitcast %variant* %x to i8* %18 = insertvalue %variant undef, i8* %17, 0 - %19 = insertvalue %variant %18, i64 ptrtoint ({ i8 }* @.typeid.variant to i64), 1 + %19 = insertvalue %variant %18, i64 ptrtoint (%.introspect* @"ct$variant" to i64), 1 store %variant %19, %variant* %x, align 8 %20 = getelementptr inbounds %variant, %variant* %y, i32 0, i32 1 %21 = load i64, i64* %20, align 8 - %eq5 = icmp eq i64 %21, ptrtoint ({ i8, i16 }* @.typeid.int to i64) + %eq5 = icmp eq i64 %21, ptrtoint (%.introspect* @"ct$int" to i64) br i1 %eq5, label %if.then6, label %if.exit7 if.then6: ; preds = %if.exit3 @@ -255,7 +254,7 @@ if.then6: ; preds = %if.exit3 if.exit7: ; preds = %if.then6, %if.exit3 %22 = getelementptr inbounds %variant, %variant* %x, i32 0, i32 1 %23 = load i64, i64* %22, align 8 - %eq8 = icmp eq i64 %23, ptrtoint ({ i8, i16 }* @.typeid.int to i64) + %eq8 = icmp eq i64 %23, ptrtoint (%.introspect* @"ct$int" to i64) br i1 %eq8, label %if.then9, label %if.exit10 if.then9: ; preds = %if.exit7 @@ -268,39 +267,39 @@ if.exit10: ; preds = %if.then9, %if.exit7 %lo = load i64, i64* %25, align 8 %26 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %24, i32 0, i32 1 %hi = load i8*, i8** %26, align 8 - call void @foo.test(i64 %lo, i8* %hi) + call void @foo_test(i64 %lo, i8* %hi) store double 1.000000e+00, double* %taddr11, align 8 %27 = bitcast double* %taddr11 to i8* %28 = insertvalue %variant undef, i8* %27, 0 - %29 = insertvalue %variant %28, i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), 1 + %29 = insertvalue %variant %28, i64 ptrtoint (%.introspect* @"ct$double" to i64), 1 store %variant %29, %variant* %taddr12, align 8 %30 = bitcast %variant* %taddr12 to { i64, i8* }* %31 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %30, i32 0, i32 0 %lo13 = load i64, i64* %31, align 8 %32 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %30, i32 0, i32 1 %hi14 = load i8*, i8** %32, align 8 - call void @foo.test(i64 %lo13, i8* %hi14) + call void @foo_test(i64 %lo13, i8* %hi14) store i32 1, i32* %taddr15, align 4 %33 = bitcast i32* %taddr15 to i8* %34 = insertvalue %variant undef, i8* %33, 0 - %35 = insertvalue %variant %34, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1 + %35 = insertvalue %variant %34, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1 store %variant %35, %variant* %taddr16, align 8 %36 = bitcast %variant* %taddr16 to { i64, i8* }* %37 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %36, i32 0, i32 0 %lo17 = load i64, i64* %37, align 8 %38 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %36, i32 0, i32 1 %hi18 = load i8*, i8** %38, align 8 - call void @foo.test(i64 %lo17, i8* %hi18) + call void @foo_test(i64 %lo17, i8* %hi18) store i8 1, i8* %taddr19, align 1 %39 = insertvalue %variant undef, i8* %taddr19, 0 - %40 = insertvalue %variant %39, i64 ptrtoint ({ i8 }* @.typeid.bool to i64), 1 + %40 = insertvalue %variant %39, i64 ptrtoint (%.introspect* @"ct$bool" to i64), 1 store %variant %40, %variant* %taddr20, align 8 %41 = bitcast %variant* %taddr20 to { i64, i8* }* %42 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %41, i32 0, i32 0 %lo21 = load i64, i64* %42, align 8 %43 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %41, i32 0, i32 1 %hi22 = load i8*, i8** %43, align 8 - call void @foo.test(i64 %lo21, i8* %hi22) + call void @foo_test(i64 %lo21, i8* %hi22) call void (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0)) store i32* null, i32** %df, align 8 %44 = getelementptr inbounds [5 x %variant], [5 x %variant]* %varargslots, i64 0, i64 0 @@ -314,17 +313,17 @@ if.exit10: ; preds = %if.then9, %if.exit7 store double 1.000000e+00, double* %taddr23, align 8 %50 = bitcast double* %taddr23 to i8* %51 = insertvalue %variant undef, i8* %50, 0 - %52 = insertvalue %variant %51, i64 ptrtoint ({ i8, i16 }* @.typeid.double to i64), 1 + %52 = insertvalue %variant %51, i64 ptrtoint (%.introspect* @"ct$double" to i64), 1 %53 = getelementptr inbounds [5 x %variant], [5 x %variant]* %varargslots, i64 0, i64 2 store %variant %52, %variant* %53, align 16 %54 = bitcast %variant* %x to i8* %55 = insertvalue %variant undef, i8* %54, 0 - %56 = insertvalue %variant %55, i64 ptrtoint ({ i8 }* @.typeid.variant to i64), 1 + %56 = insertvalue %variant %55, i64 ptrtoint (%.introspect* @"ct$variant" to i64), 1 %57 = getelementptr inbounds [5 x %variant], [5 x %variant]* %varargslots, i64 0, i64 3 store %variant %56, %variant* %57, align 16 %58 = bitcast i32** %df to i8* %59 = insertvalue %variant undef, i8* %58, 0 - %60 = insertvalue %variant %59, i64 ptrtoint ({ i8, i64 }* @".typeid.int*" to i64), 1 + %60 = insertvalue %variant %59, i64 ptrtoint (%.introspect* @"ct$p$int" to i64), 1 %61 = getelementptr inbounds [5 x %variant], [5 x %variant]* %varargslots, i64 0, i64 4 store %variant %60, %variant* %61, align 16 %62 = getelementptr inbounds %"variant[]", %"variant[]"* %vararg, i32 0, i32 1 @@ -337,6 +336,6 @@ if.exit10: ; preds = %if.then9, %if.exit7 %lo24 = load i8*, i8** %66, align 8 %67 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %65, i32 0, i32 1 %hi25 = load i64, i64* %67, align 8 - call void @foo.test_all(i8* %lo24, i64 %hi25) + call void @foo_test_all(i8* %lo24, i64 %hi25) ret void } diff --git a/test/test_suite/vector/vector_bit.c3t b/test/test_suite/vector/vector_bit.c3t index e8f9f329d..a415568da 100644 --- a/test/test_suite/vector/vector_bit.c3t +++ b/test/test_suite/vector/vector_bit.c3t @@ -39,7 +39,7 @@ fn void main() /* #expect: vector_bit.ll ; Function Attrs: nounwind -define void @vector_bit.testf() #0 { +define void @vector_bit_testf() #0 { entry: %y = alloca <4 x float>, align 16 %w = alloca <4 x i32>, align 16 @@ -61,7 +61,7 @@ entry: } ; Function Attrs: nounwind -define void @vector_bit.testi() #0 { +define void @vector_bit_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 diff --git a/test/test_suite/vector/vector_incdec.c3t b/test/test_suite/vector/vector_incdec.c3t index 50f2d6941..75c1132b6 100644 --- a/test/test_suite/vector/vector_incdec.c3t +++ b/test/test_suite/vector/vector_incdec.c3t @@ -38,7 +38,7 @@ fn void main() /* #expect: vector_incdec.ll -define void @vector_incdec.testf() #0 { +define void @vector_incdec_testf() #0 { entry: %y = alloca <4 x float>, align 16 %z = alloca <4 x float>, align 16 @@ -113,7 +113,7 @@ entry: } ; Function Attrs: nounwind -define void @vector_incdec.testi() #0 { +define void @vector_incdec_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 @@ -182,9 +182,9 @@ entry: ret void } -define void @vector_incdec.main() #0 { +define void @vector_incdec_main() #0 { entry: - call void @vector_incdec.testf() - call void @vector_incdec.testi() + call void @vector_incdec_testf() + call void @vector_incdec_testi() ret void } diff --git a/test/test_suite/vector/vector_init.c3t b/test/test_suite/vector/vector_init.c3t index d3ff008bb..e1ed717de 100644 --- a/test/test_suite/vector/vector_init.c3t +++ b/test/test_suite/vector/vector_init.c3t @@ -14,10 +14,10 @@ fn void main() /* #expect: vector_init.ll -@vector_init.baz = local_unnamed_addr global <4 x i32> , align 16 +@vector_init_baz = local_unnamed_addr global <4 x i32> , align 16 ; Function Attrs: nounwind -define void @vector_init.main() #0 { +define void @vector_init_main() #0 { entry: %foo = alloca <4 x i32>, align 16 %z = alloca i32, align 4 diff --git a/test/test_suite/vector/vector_ops.c3t b/test/test_suite/vector/vector_ops.c3t index a58b16efd..3f295095d 100644 --- a/test/test_suite/vector/vector_ops.c3t +++ b/test/test_suite/vector/vector_ops.c3t @@ -98,7 +98,7 @@ fn void main() /* #expect: vector_ops.ll ; Function Attrs: nounwind -define void @vector_ops.testf() #0 { +define void @vector_ops_testf() #0 { entry: %y = alloca <4 x float>, align 16 %z = alloca <4 x float>, align 16 @@ -262,7 +262,7 @@ entry: } ; Function Attrs: nounwind -define void @vector_ops.testb() #0 { +define void @vector_ops_testb() #0 { entry: %y = alloca <4 x i8>, align 4 %z = alloca <4 x i8>, align 4 @@ -381,7 +381,7 @@ entry: } ; Function Attrs: nounwind -define void @vector_ops.testi() #0 { +define void @vector_ops_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 diff --git a/test/test_suite/vector/vector_ops2.c3t b/test/test_suite/vector/vector_ops2.c3t index 02b6fb00e..af9f5c9fb 100644 --- a/test/test_suite/vector/vector_ops2.c3t +++ b/test/test_suite/vector/vector_ops2.c3t @@ -99,7 +99,7 @@ fn void main() /* #expect: test.ll -define void @test.testf() #0 { +define void @test_testf() #0 { entry: %y = alloca <4 x float>, align 16 %z = alloca <4 x float>, align 16 @@ -149,7 +149,7 @@ entry: br i1 %zero, label %panic, label %checkok panic: ; preds = %entry - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.zstr, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.3, i64 0, i64 0), i32 12) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.zstr, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.3, i64 0, i64 0), i32 12) br label %checkok checkok: ; preds = %panic, %entry @@ -273,7 +273,7 @@ checkok: ; preds = %panic, %entry } ; Function Attrs: nounwind -define void @test.testb() #0 { +define void @test_testb() #0 { entry: %y = alloca <4 x i8>, align 4 %z = alloca <4 x i8>, align 4 @@ -392,7 +392,7 @@ entry: } ; Function Attrs: nounwind -define void @test.testi() #0 { +define void @test_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 @@ -433,7 +433,7 @@ entry: br i1 %zero, label %panic, label %checkok panic: ; preds = %entry - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.zstr.20, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.21, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.22, i64 0, i64 0), i32 56) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.zstr.20, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.21, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.22, i64 0, i64 0), i32 56) br label %checkok checkok: ; preds = %panic, %entry @@ -468,7 +468,7 @@ checkok: ; preds = %panic, %entry br i1 %shift_underflow, label %panic1, label %checkok2 panic1: ; preds = %checkok - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.25, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.26, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.27, i64 0, i64 0), i32 60) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.25, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.26, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.27, i64 0, i64 0), i32 60) br label %checkok2 checkok2: ; preds = %panic1, %checkok @@ -477,7 +477,7 @@ checkok2: ; preds = %panic1, %checkok br i1 %shift_exceeds, label %panic3, label %checkok4 panic3: ; preds = %checkok2 - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.28, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.29, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.30, i64 0, i64 0), i32 60) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.28, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.29, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.30, i64 0, i64 0), i32 60) br label %checkok4 checkok4: ; preds = %panic3, %checkok2 @@ -500,7 +500,7 @@ checkok4: ; preds = %panic3, %checkok2 br i1 %shift_underflow5, label %panic6, label %checkok7 panic6: ; preds = %checkok4 - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.32, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.33, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.34, i64 0, i64 0), i32 62) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.32, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.33, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.34, i64 0, i64 0), i32 62) br label %checkok7 checkok7: ; preds = %panic6, %checkok4 @@ -509,7 +509,7 @@ checkok7: ; preds = %panic6, %checkok4 br i1 %shift_exceeds8, label %panic9, label %checkok10 panic9: ; preds = %checkok7 - call void @"std::core::builtin.panic"(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.35, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.36, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.37, i64 0, i64 0), i32 62) + call void @std_core_builtin_panic(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.zstr.35, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.zstr.36, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.zstr.37, i64 0, i64 0), i32 62) br label %checkok10 checkok10: ; preds = %panic9, %checkok7 diff --git a/test/test_suite/vector/vector_to_array_cast.c3t b/test/test_suite/vector/vector_to_array_cast.c3t index f9ef1783f..50410c149 100644 --- a/test/test_suite/vector/vector_to_array_cast.c3t +++ b/test/test_suite/vector/vector_to_array_cast.c3t @@ -14,10 +14,10 @@ fn void tester() /* #expect: test.ll -@test.b = local_unnamed_addr global <2 x i32> , align 8 -@test.c = local_unnamed_addr global [2 x i32] [i32 1, i32 2], align 4 +@test_b = local_unnamed_addr global <2 x i32> , align 8 +@test_c = local_unnamed_addr global [2 x i32] [i32 1, i32 2], align 4 -define void @test.tester() #0 { +define void @test_tester() #0 { entry: %x = alloca <2 x i32>, align 8 %y = alloca [2 x i32], align 4 diff --git a/test/test_suite2/abi/aarch64_args.c3t b/test/test_suite2/abi/aarch64_args.c3t index 2de1b44db..498a388c2 100644 --- a/test/test_suite2/abi/aarch64_args.c3t +++ b/test/test_suite2/abi/aarch64_args.c3t @@ -15,7 +15,7 @@ fn void example() { /* #expect: test.ll -define void @test.example() #0 { +define void @test_example() #0 { entry: %l = alloca %Large, align 8 %indirectarg = alloca %Large, align 8 diff --git a/test/test_suite2/abi/aarch64_hfa_args.c3t b/test/test_suite2/abi/aarch64_hfa_args.c3t index 7a3522e1b..bead21eb7 100644 --- a/test/test_suite2/abi/aarch64_hfa_args.c3t +++ b/test/test_suite2/abi/aarch64_hfa_args.c3t @@ -28,5 +28,5 @@ fn MixedHFAv3 test_mixed(MixedHFAv3 a0, MixedHFAv3 a1, MixedHFAv3 a2) { %HFAv3 = type { [4 x <3 x float>] } %MixedHFAv3 = type { [3 x <3 x float>], <16 x i8> } -define %HFAv3 @test.test([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) -define %MixedHFAv3 @test.test_mixed([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) #0 { +define %HFAv3 @test_test([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) +define %MixedHFAv3 @test_test_mixed([4 x <4 x float>] %0, [4 x <4 x float>] %1, [4 x <4 x float>] %2) #0 { diff --git a/test/test_suite2/abi/darwin64_avx.c3t b/test/test_suite2/abi/darwin64_avx.c3t index b8f843816..76680cddc 100644 --- a/test/test_suite2/abi/darwin64_avx.c3t +++ b/test/test_suite2/abi/darwin64_avx.c3t @@ -112,18 +112,18 @@ declare void @f38(<8 x float>) declare void @f37(<8 x float>) declare void @func40(ptr byval(%Two128) align 16) -define void @test.func41(ptr byval(%Two128) align 16 %0) +define void @test_func41(ptr byval(%Two128) align 16 %0) declare void @func42(ptr byval(%Sa) align 16) -define void @test.func43(ptr byval(%Sa) align 16 %0) +define void @test_func43(ptr byval(%Sa) align 16 %0) declare void @f46(double, double, double, double, double, double, double, double, ptr byval(<2 x float>) align 8, ptr byval(<2 x float>) align 8) #0 declare void @f47(i32, i32, i32, i32, i32, i32, i32) -declare void @test.test49_helper(double, ...) -define void @test.test49(double %0, double %1) +declare void @test_test49_helper(double, ...) +define void @test_test49(double %0, double %1) entry: - call void (double, ...) @test.test49_helper(double %0, double %1) + call void (double, ...) @test_test49_helper(double %0, double %1) ret void call void (i32, ...) @test52_helper(i32 0, <8 x float> %0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) @@ -134,8 +134,8 @@ declare void @f55(ptr byval(%St512) align 64) declare void @f56(ptr byval(<16 x float>) align 64) declare void @f58(ptr byval(%Two256) align 32) -define void @test.f59(ptr byval(%Two256) align 32 %0) +define void @test_f59(ptr byval(%Two256) align 32 %0) declare void @f60(ptr byval(%SAtwo256) align 32) -define void @test.f61(ptr byval(%SAtwo256) align 32 %0) #0 { +define void @test_f61(ptr byval(%SAtwo256) align 32 %0) #0 { diff --git a/test/test_suite2/abi/darwin64_avx512.c3t b/test/test_suite2/abi/darwin64_avx512.c3t index ee2afdce5..f08a45ed4 100644 --- a/test/test_suite2/abi/darwin64_avx512.c3t +++ b/test/test_suite2/abi/darwin64_avx512.c3t @@ -62,13 +62,13 @@ declare void @f55(<16 x float>) #0 declare void @f56(<16 x float>) #0 declare void @f58(ptr byval(%Two256) align 32) #0 -define void @test.f59(ptr byval(%Two256) align 32 %0) #0 { +define void @test_f59(ptr byval(%Two256) align 32 %0) #0 { declare void @f60(ptr byval(%SAtwo256) align 32) #0 -define void @test.f61(ptr byval(%SAtwo256) align 32 %0) #0 { +define void @test_f61(ptr byval(%SAtwo256) align 32 %0) #0 { -define void @test.f62() #0 { - call void (i32, ...) @test.f62_helper(i32 0, <16 x float> %0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) -define void @test.f64() #0 { - call void (<16 x float>, ...) @test.f64_helper(<16 x float> %0, <16 x float> %1, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) - call void (<16 x float>, ...) @test.f64_helper(<16 x float> %6, <16 x float> %7, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, ptr byval(%Complex) align 8 %indirectarg) +define void @test_f62() #0 { + call void (i32, ...) @test_f62_helper(i32 0, <16 x float> %0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) +define void @test_f64() #0 { + call void (<16 x float>, ...) @test_f64_helper(<16 x float> %0, <16 x float> %1, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double %lo, double %hi) + call void (<16 x float>, ...) @test_f64_helper(<16 x float> %6, <16 x float> %7, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, ptr byval(%Complex) align 8 %indirectarg) diff --git a/test/test_suite2/abi/darwin64_sse.c3t b/test/test_suite2/abi/darwin64_sse.c3t index a13b9bf04..98dfe1932 100644 --- a/test/test_suite2/abi/darwin64_sse.c3t +++ b/test/test_suite2/abi/darwin64_sse.c3t @@ -50,7 +50,7 @@ declare void @f38(ptr byval(%St256) align 32) declare void @f37(ptr byval(<8 x float>) align 32) declare void @func40(ptr byval(%Two128) align 16) -define void @test.func41(ptr byval(%Two128) align 16 %0) +define void @test_func41(ptr byval(%Two128) align 16 %0) declare void @func42(ptr byval(%Sa) align 16) -define void @test.func43(ptr byval(%Sa) align 16 %0) +define void @test_func43(ptr byval(%Sa) align 16 %0) diff --git a/test/test_suite2/abi/darwinx64_1.c3t b/test/test_suite2/abi/darwinx64_1.c3t index bbdf16a09..f332dffbe 100644 --- a/test/test_suite2/abi/darwinx64_1.c3t +++ b/test/test_suite2/abi/darwinx64_1.c3t @@ -37,12 +37,12 @@ fn void f8_2(Struct8 a0) {} /* #expect: test.ll -define zeroext i8 @test.f0() -define signext i16 @test.f1() -define i32 @test.f2() -define float @test.f3() -define double @test.f4() -define void @test.f6(i8 zeroext %0, i16 signext %1, i32 %2, i64 %3, ptr %4) -define void @test.f7(i32 %0) -define i64 @test.f8_1() -define void @test.f8_2(i64 %0) #0 { +define zeroext i8 @test_f0() +define signext i16 @test_f1() +define i32 @test_f2() +define float @test_f3() +define double @test_f4() +define void @test_f6(i8 zeroext %0, i16 signext %1, i32 %2, i64 %3, ptr %4) +define void @test_f7(i32 %0) +define i64 @test_f8_1() +define void @test_f8_2(i64 %0) #0 { diff --git a/test/test_suite2/abi/darwinx64_2.c3t b/test/test_suite2/abi/darwinx64_2.c3t index 800d90c26..baa795825 100644 --- a/test/test_suite2/abi/darwinx64_2.c3t +++ b/test/test_suite2/abi/darwinx64_2.c3t @@ -147,40 +147,40 @@ fn V2i32 f36(V2i32 arg) { return arg; } /* #expect: test.ll -define i32 @test.f12_0() -define void @test.f12_1(i32 %0) -define void @test.f13(ptr noalias sret(%St13_0) align 8 %0, i32 %1, i32 %2, i32 %3, i32 %4, ptr byval(%St13_1) align 8 %5, i32 %6) #0 { -define void @test.f14(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 signext %6) #0 { -define void @test.f15(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, ptr %6) +define i32 @test_f12_0() +define void @test_f12_1(i32 %0) +define void @test_f13(ptr noalias sret(%St13_0) align 8 %0, i32 %1, i32 %2, i32 %3, i32 %4, ptr byval(%St13_1) align 8 %5, i32 %6) #0 { +define void @test_f14(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i8 signext %6) #0 { +define void @test_f15(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, ptr %6) -define void @test.f16(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) +define void @test_f16(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) -define void @test.fl18(i32 %0, i32 %1) -define void @test.f20(ptr byval(%St20) align 32 %0) -define ptr @test.f21(i64 %0, ptr %1) +define void @test_fl18(i32 %0, i32 %1) +define void @test_f20(ptr byval(%St20) align 32 %0) +define ptr @test_f21(i64 %0, ptr %1) -define void @test.f22(i64 %0, i64 %1, i64 %2, i64 %3) +define void @test_f22(i64 %0, i64 %1, i64 %2, i64 %3) entry: %x = alloca %St22s, align 16 %y = alloca %St22s, align 16 -define void @test.f23(i32 %0, i64 %1, i32 %2) -define { i64, i32 } @test.f24(ptr %0, ptr %1) +define void @test_f23(i32 %0, i64 %1, i32 %2) +define { i64, i32 } @test_f24(ptr %0, ptr %1) -define <4 x float> @test.f25(<4 x float> %0) #0 { +define <4 x float> @test_f25(<4 x float> %0) #0 { entry: %fadd = fadd <4 x float> %0, %0 ret <4 x float> %fadd } -define { ptr, ptr } @test.f26(ptr %0) -define <4 x float> @test.f27(<4 x float> %0) -define <8 x float> @test.f27a(<8 x float> %0) -define <8 x float> @test.f27b(<8 x float> %0) -define void @test.f28(double %0, i32 %1) -define void @test.f29a(double %0, i32 %1) -define void @test.f30(i64 %0, i24 %1) -define float @test.f31(<2 x float> %0, float %1) -define double @test.f34(double %0) -define double @test.f35(double %0) -define double @test.f36(double %0) \ No newline at end of file +define { ptr, ptr } @test_f26(ptr %0) +define <4 x float> @test_f27(<4 x float> %0) +define <8 x float> @test_f27a(<8 x float> %0) +define <8 x float> @test_f27b(<8 x float> %0) +define void @test_f28(double %0, i32 %1) +define void @test_f29a(double %0, i32 %1) +define void @test_f30(i64 %0, i24 %1) +define float @test_f31(<2 x float> %0, float %1) +define double @test_f34(double %0) +define double @test_f35(double %0) +define double @test_f36(double %0) \ No newline at end of file diff --git a/test/test_suite2/abi/literal_load.c3t b/test/test_suite2/abi/literal_load.c3t index 14abeb86f..797ce3bdb 100644 --- a/test/test_suite2/abi/literal_load.c3t +++ b/test/test_suite2/abi/literal_load.c3t @@ -17,7 +17,7 @@ fn Test creator() /* #expect: literal_load.ll -define i32 @literal_load.creator() #0 { +define i32 @literal_load_creator() #0 { entry: %literal = alloca %Test, align 4 %literal1 = alloca %Test, align 4 diff --git a/test/test_suite2/abi/literal_load_aarch64.c3t b/test/test_suite2/abi/literal_load_aarch64.c3t index f9e98f8bb..dde880cfa 100644 --- a/test/test_suite2/abi/literal_load_aarch64.c3t +++ b/test/test_suite2/abi/literal_load_aarch64.c3t @@ -20,7 +20,7 @@ fn Test creator() declare void @blorg(i64) #0 -define i32 @literal_load.creator() #0 { +define i32 @literal_load_creator() #0 { entry: %literal = alloca %Test, align 4 %literal1 = alloca %Test, align 4 diff --git a/test/test_suite2/abi/literal_load_mingw.c3t b/test/test_suite2/abi/literal_load_mingw.c3t index 5b9e9eccd..430a9da08 100644 --- a/test/test_suite2/abi/literal_load_mingw.c3t +++ b/test/test_suite2/abi/literal_load_mingw.c3t @@ -18,7 +18,7 @@ fn Test creator() /* #expect: literal_load.ll -define i32 @literal_load.creator() #0 { +define i32 @literal_load_creator() #0 { entry: %literal = alloca %Test, align 4 %literal1 = alloca %Test, align 4 diff --git a/test/test_suite2/abi/pass_large_aarch.c3t b/test/test_suite2/abi/pass_large_aarch.c3t index 52e15789a..ad4f36305 100644 --- a/test/test_suite2/abi/pass_large_aarch.c3t +++ b/test/test_suite2/abi/pass_large_aarch.c3t @@ -19,7 +19,7 @@ fn void example() /* #expect: pass_large.ll -define void @pass_large.example() +define void @pass_large_example() entry: %l = alloca %Large, align 8 %indirectarg = alloca %Large, align 8 diff --git a/test/test_suite2/abi/regcall_expand.c3t b/test/test_suite2/abi/regcall_expand.c3t index 6946518ce..d250c8c77 100644 --- a/test/test_suite2/abi/regcall_expand.c3t +++ b/test/test_suite2/abi/regcall_expand.c3t @@ -21,13 +21,13 @@ fn int main() %Foo = type { [2 x float] } -$.typeid.test.Foo = comdat any +$"ct$test_Foo" = comdat any -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 1 }, comdat, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 1, [0 x i64] zeroinitializer }, comdat, align 8 declare void @printf(ptr, ...) #0 -define x86_regcallcc void @test.test(float %0, float %1) #0 { +define x86_regcallcc void @test_test(float %0, float %1) #0 { entry: %x = alloca %Foo, align 4 %2 = getelementptr inbounds %Foo, ptr %x, i32 0, i32 0 @@ -52,6 +52,6 @@ entry: %loadexpanded = load float, ptr %4, align 4 %5 = getelementptr inbounds [2 x float], ptr %3, i64 0, i64 1 %loadexpanded1 = load float, ptr %5, align 4 - call x86_regcallcc void @test.test(float %loadexpanded, float %loadexpanded1) + call x86_regcallcc void @test_test(float %loadexpanded, float %loadexpanded1) ret i32 0 -} +} \ No newline at end of file diff --git a/test/test_suite2/abi/riscv64-lp64-abi.c3t b/test/test_suite2/abi/riscv64-lp64-abi.c3t index bb2819297..9e20ff93c 100644 --- a/test/test_suite2/abi/riscv64-lp64-abi.c3t +++ b/test/test_suite2/abi/riscv64-lp64-abi.c3t @@ -19,7 +19,7 @@ fn Large f_scalar_stack_2(double a, int128 b, float128 c, V32i8 d, /* #expect: test.ll -define signext i32 @test.f_scalar_stack_1(i32 signext %0, i128 %1, float %2, fp128 %3, ptr align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { +define signext i32 @test_f_scalar_stack_1(i32 signext %0, i128 %1, float %2, fp128 %3, ptr align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { entry: %e = alloca <32 x i8>, align 32 call void @llvm.memcpy.p0.p0.i32(ptr align 32 %e, ptr align 32 %4, i32 32, i1 false) @@ -29,7 +29,7 @@ entry: ret i32 %add } -define void @test.f_scalar_stack_2(ptr noalias sret(%Large) align 8 %0, double %1, i128 %2, fp128 %3, ptr align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { +define void @test_f_scalar_stack_2(ptr noalias sret(%Large) align 8 %0, double %1, i128 %2, fp128 %3, ptr align 32 %4, i8 zeroext %5, i8 %6, i8 %7) #0 { entry: %d = alloca <32 x i8>, align 32 %literal = alloca %Large, align 8 diff --git a/test/test_suite2/abi/small_struct_x64.c3t b/test/test_suite2/abi/small_struct_x64.c3t index 1ca3fa243..c45aa3b5c 100644 --- a/test/test_suite2/abi/small_struct_x64.c3t +++ b/test/test_suite2/abi/small_struct_x64.c3t @@ -20,7 +20,7 @@ fn Foo getFoo(Foo f) /* #expect: test.ll -define i32 @test.testing() #0 { +define i32 @test_testing() #0 { entry: %y = alloca %Foo, align 1 %literal = alloca %Foo, align 1 @@ -34,7 +34,7 @@ entry: store i8 6, ptr %2, align 1 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %tempcoerce, ptr align 1 %literal, i32 3, i1 false) %3 = load i24, ptr %tempcoerce, align 4 - %4 = call i24 @test.getFoo(i24 %3) + %4 = call i24 @test_getFoo(i24 %3) store i24 %4, ptr %result, align 1 call void @llvm.memcpy.p0.p0.i32(ptr align 1 %y, ptr align 1 %result, i32 3, i1 false) %5 = getelementptr inbounds %Foo, ptr %y, i32 0, i32 0 @@ -48,7 +48,7 @@ entry: } ; Function Attrs: nounwind -define i24 @test.getFoo(i24 %0) #0 { +define i24 @test_getFoo(i24 %0) #0 { entry: %f = alloca %Foo, align 1 %literal = alloca %Foo, align 1 diff --git a/test/test_suite2/abi/sysv_direct_coerce.c3t b/test/test_suite2/abi/sysv_direct_coerce.c3t index 210a6218b..05dbffc86 100644 --- a/test/test_suite2/abi/sysv_direct_coerce.c3t +++ b/test/test_suite2/abi/sysv_direct_coerce.c3t @@ -16,7 +16,7 @@ fn void test(Rectangle r) /* #expect: foo.ll -define void @foo.test(<2 x float> %0, <2 x float> %1) #0 { +define void @foo_test(<2 x float> %0, <2 x float> %1) #0 { entry: %r = alloca %Rectangle, align 4 %literal = alloca %Rectangle, align 4 @@ -38,6 +38,6 @@ entry: %lo = load <2 x float>, ptr %8, align 8 %9 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %coerce, i32 0, i32 1 %hi = load <2 x float>, ptr %9, align 8 - call void @foo.test(<2 x float> %lo, <2 x float> %hi) + call void @foo_test(<2 x float> %lo, <2 x float> %hi) ret void } \ No newline at end of file diff --git a/test/test_suite2/abi/test_sret.c3t b/test/test_suite2/abi/test_sret.c3t index b2cf432f6..54b20680c 100644 --- a/test/test_suite2/abi/test_sret.c3t +++ b/test/test_suite2/abi/test_sret.c3t @@ -24,7 +24,7 @@ declare void @foo1(ptr noalias sret(%Abc) align 8) #0 declare void @foo2(ptr noalias sret(%Abc) align 8) #0 -define void @test_sret.bar() #0 { +define void @test_sret_bar() #0 { entry: %dummy1 = alloca %Abc, align 8 %sretparam = alloca %Abc, align 8 diff --git a/test/test_suite2/abi/union_x64.c3t b/test/test_suite2/abi/union_x64.c3t index fb8c9e4d6..daf3b8dd5 100644 --- a/test/test_suite2/abi/union_x64.c3t +++ b/test/test_suite2/abi/union_x64.c3t @@ -20,7 +20,7 @@ fn void hello(Foo f) declare void @hello2(i64, i64) #0 -define void @unionx64.hello(i64 %0, i64 %1) #0 { +define void @unionx64_hello(i64 %0, i64 %1) #0 { entry: %f = alloca %Foo, align 8 %2 = getelementptr inbounds { i64, i64 }, ptr %f, i32 0, i32 0 diff --git a/test/test_suite2/abi/x64alignarray.c3t b/test/test_suite2/abi/x64alignarray.c3t index 892d45fe0..8c4ee8a6b 100644 --- a/test/test_suite2/abi/x64alignarray.c3t +++ b/test/test_suite2/abi/x64alignarray.c3t @@ -11,7 +11,7 @@ fn void test1_g() /* #expect: test.ll -define void @test.test1_g() #0 { +define void @test_test1_g() #0 { entry: %x = alloca [4 x float], align 16 %0 = getelementptr inbounds [4 x float], ptr %x, i64 0, i64 0 diff --git a/test/test_suite2/arrays/array_casts.c3t b/test/test_suite2/arrays/array_casts.c3t index 04c31c96b..e2b7065c3 100644 --- a/test/test_suite2/arrays/array_casts.c3t +++ b/test/test_suite2/arrays/array_casts.c3t @@ -13,7 +13,7 @@ fn void test() %"int[]" = type { ptr, i64 } -define void @array_casts.test() #0 { +define void @array_casts_test() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca ptr, align 8 diff --git a/test/test_suite2/arrays/array_literal.c3t b/test/test_suite2/arrays/array_literal.c3t index dd96c65e0..02dc0d244 100644 --- a/test/test_suite2/arrays/array_literal.c3t +++ b/test/test_suite2/arrays/array_literal.c3t @@ -16,7 +16,7 @@ fn double test(uint x) @.__const = private unnamed_addr constant [30 x double] [double 0.000000e+00, double 1.270600e+01, double 4.303000e+00, double 3.182000e+00, double 2.776000e+00, double 2.571000e+00, double 2.447000e+00, double 2.365000e+00, double 2.306000e+00, double 2.262000e+00, double 2.228000e+00, double 2.201000e+00, double 2.179000e+00, double 2.160000e+00, double 2.145000e+00, double 2.131000e+00, double 2.120000e+00, double 2.110000e+00, double 2.101000e+00, double 2.093000e+00, double 2.086000e+00, double 2.080000e+00, double 2.074000e+00, double 2.069000e+00, double 2.064000e+00, double 2.060000e+00, double 2.056000e+00, double 2.052000e+00, double 2.048000e+00, double 2.045000e+00], align 16 -define double @array_literal.test(i32 %0) #0 { +define double @array_literal_test(i32 %0) #0 { entry: %student_t = alloca [30 x double], align 16 call void @llvm.memcpy.p0.p0.i32(ptr align 16 %student_t, ptr align 16 @.__const, i32 240, i1 false) diff --git a/test/test_suite2/arrays/array_struct.c3t b/test/test_suite2/arrays/array_struct.c3t index 2d4ebb1c0..95a64f13f 100644 --- a/test/test_suite2/arrays/array_struct.c3t +++ b/test/test_suite2/arrays/array_struct.c3t @@ -10,4 +10,4 @@ private Foo[10] array; // #expect: test.ll -@test.array = protected unnamed_addr global [10 x %Foo] zeroinitializer, align 16 \ No newline at end of file +@test_array = protected unnamed_addr global [10 x %Foo] zeroinitializer, align 16 \ No newline at end of file diff --git a/test/test_suite2/arrays/complex_array_const.c3t b/test/test_suite2/arrays/complex_array_const.c3t index 27fdcd496..af690fbd3 100644 --- a/test/test_suite2/arrays/complex_array_const.c3t +++ b/test/test_suite2/arrays/complex_array_const.c3t @@ -15,8 +15,8 @@ private Connection[3] link /* #expect: test.ll -@.typeid.test.Connection = linkonce constant { i8, i64 } { i8 10, i64 3 }, align 8 +@"ct$test_Connection" = linkonce constant %.introspect { i8 10, i64 24, i64 0, i64 3, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [6 x i8] c"link1\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"link2\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"link3\00", align 1 -@test.link = protected unnamed_addr global [3 x %Connection] [%Connection { i64 1, ptr @.str, i64 10 }, %Connection { i64 2, ptr @.str.1, i64 20 }, %Connection { i64 3, ptr @.str.2, i64 30 }], align 16 +@test_link = protected unnamed_addr global [3 x %Connection] [%Connection { i64 1, ptr @.str, i64 10 }, %Connection { i64 2, ptr @.str.1, i64 20 }, %Connection { i64 3, ptr @.str.2, i64 30 }], align 16 diff --git a/test/test_suite2/arrays/index_from_back.c3t b/test/test_suite2/arrays/index_from_back.c3t index 4fdbb17be..36b53816c 100644 --- a/test/test_suite2/arrays/index_from_back.c3t +++ b/test/test_suite2/arrays/index_from_back.c3t @@ -15,7 +15,7 @@ fn void test(int[10] x, int[<10>] y) /* #expect: test.ll -define void @test.test(ptr byval([10 x i32]) align 8 %0, ptr byval(<10 x i32>) align 64 %1) #0 { +define void @test_test(ptr byval([10 x i32]) align 8 %0, ptr byval(<10 x i32>) align 64 %1) #0 { entry: %x = alloca [10 x i32], align 4 %y = alloca <10 x i32>, align 64 diff --git a/test/test_suite2/arrays/index_into_global.c3t b/test/test_suite2/arrays/index_into_global.c3t index 544e7c53e..8c107bea6 100644 --- a/test/test_suite2/arrays/index_into_global.c3t +++ b/test/test_suite2/arrays/index_into_global.c3t @@ -22,12 +22,12 @@ fn void test_bar(int idx) /* #expect: foo.ll -define void @foo.test_bar(i32 %0) #0 { +define void @foo_test_bar(i32 %0) #0 { entry: %sisiext = sext i32 %0 to i64 - %1 = getelementptr inbounds [6 x %Bar], ptr @foo.bar, i64 0, i64 %sisiext + %1 = getelementptr inbounds [6 x %Bar], ptr @foo_bar, i64 0, i64 %sisiext %2 = getelementptr inbounds %Bar, ptr %1, i32 0, i32 0 store i32 0, ptr %2, align 4 - store i32 %0, ptr @foo.bar, align 4 + store i32 %0, ptr @foo_bar, align 4 ret void } diff --git a/test/test_suite2/assert/assert_variants.c3t b/test/test_suite2/assert/assert_variants.c3t index fa9add3f5..f9f8a5a32 100644 --- a/test/test_suite2/assert/assert_variants.c3t +++ b/test/test_suite2/assert/assert_variants.c3t @@ -24,11 +24,11 @@ fn void test() %x = alloca i32, align 4 %y = alloca i32, align 4 %z = alloca i32, align 4 - %0 = call i32 @assert_variants.foo() + %0 = call i32 @assert_variants_foo() store i32 %0, ptr %x, align 4 - %1 = call i32 @assert_variants.foo() + %1 = call i32 @assert_variants_foo() store i32 %1, ptr %y, align 4 - %2 = call i32 @assert_variants.foo() + %2 = call i32 @assert_variants_foo() store i32 %2, ptr %z, align 4 %3 = load i32, ptr %x, align 4 %gt = icmp sgt i32 %3, 0 diff --git a/test/test_suite2/assert/unreachable.c3t b/test/test_suite2/assert/unreachable.c3t index f6b6df77c..598c5687e 100644 --- a/test/test_suite2/assert/unreachable.c3t +++ b/test/test_suite2/assert/unreachable.c3t @@ -14,11 +14,10 @@ fn void test() /* #expect: unreachable.ll - -define void @unreachable.test() #0 { +define void @unreachable_test() #0 { entry: %x = alloca i32, align 4 - %0 = call i32 @unreachable.foo() + %0 = call i32 @unreachable_foo() store i32 %0, ptr %x, align 4 %1 = load i32, ptr %x, align 4 %gt = icmp sgt i32 %1, 0 @@ -28,7 +27,7 @@ if.then: ; preds = %entry ret void if.exit: ; preds = %entry - call void @"std::core::builtin.panic"(ptr @.str, ptr @.str.1, ptr @.str.2, i32 10) + call void @std_core_builtin_panic(ptr @.str, ptr @.str.1, ptr @.str.2, i32 10) unreachable after.unreachable: ; No predecessors! diff --git a/test/test_suite2/attributes/user_defined_attributes.c3t b/test/test_suite2/attributes/user_defined_attributes.c3t index c598162f0..bb957cc49 100644 --- a/test/test_suite2/attributes/user_defined_attributes.c3t +++ b/test/test_suite2/attributes/user_defined_attributes.c3t @@ -28,18 +28,18 @@ fn void main() @TestZero %Foo = type { i32, [1020 x i8], i32, [1020 x i8] } -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@test.f = local_unnamed_addr global %Foo zeroinitializer, align 1024 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 2048, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@test_f = local_unnamed_addr global %Foo zeroinitializer, align 1024 -define void @test.testme() #0 { +define void @test_testme() #0 { entry: %x = alloca i32, align 4 store i32 0, ptr %x, align 4 ret void } -define void @test.main() #1 { +define void @test_main() #1 { entry: - call void @test.testme() + call void @test_testme() ret void } \ No newline at end of file diff --git a/test/test_suite2/bitstruct/array_with_boolean.c3t b/test/test_suite2/bitstruct/array_with_boolean.c3t index 1d113eda7..31542d529 100644 --- a/test/test_suite2/bitstruct/array_with_boolean.c3t +++ b/test/test_suite2/bitstruct/array_with_boolean.c3t @@ -23,7 +23,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %xx = alloca [3 x i8], align 1 %xy = alloca [3 x i8], align 1 diff --git a/test/test_suite2/bitstruct/bitfield_access.c3t b/test/test_suite2/bitstruct/bitfield_access.c3t index 3c752951b..1a58a9d1e 100644 --- a/test/test_suite2/bitstruct/bitfield_access.c3t +++ b/test/test_suite2/bitstruct/bitfield_access.c3t @@ -93,7 +93,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %b = alloca i8, align 1 %c1 = alloca i16, align 2 diff --git a/test/test_suite2/bitstruct/bitstruct_access_signed.c3t b/test/test_suite2/bitstruct/bitstruct_access_signed.c3t index 9e7e5c25a..265ada0d1 100644 --- a/test/test_suite2/bitstruct/bitstruct_access_signed.c3t +++ b/test/test_suite2/bitstruct/bitstruct_access_signed.c3t @@ -30,7 +30,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %xx = alloca [3 x i8], align 1 %xxu = alloca [3 x i8], align 1 diff --git a/test/test_suite2/bitstruct/bitstruct_arrays.c3t b/test/test_suite2/bitstruct/bitstruct_arrays.c3t index 549b7d75c..4a5290c61 100644 --- a/test/test_suite2/bitstruct/bitstruct_arrays.c3t +++ b/test/test_suite2/bitstruct/bitstruct_arrays.c3t @@ -122,16 +122,16 @@ fn void test3() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: - call void @foo.test1() - call void @foo.test2() - call void @foo.test3() + call void @foo_test1() + call void @foo_test2() + call void @foo_test3() ret void } ; Function Attrs: nounwind -define void @foo.test1() #0 { +define void @foo_test1() #0 { entry: %xx = alloca i64, align 8 store i64 531994, ptr %xx, align 8 @@ -342,7 +342,7 @@ entry: } ; Function Attrs: nounwind -define void @foo.test2() #0 { +define void @foo_test2() #0 { entry: %xx = alloca [3 x i8], align 1 store [3 x i8] c"\1A\1E\00", ptr %xx, align 1 @@ -739,7 +739,7 @@ entry: } ; Function Attrs: nounwind -define void @foo.test3() #0 { +define void @foo_test3() #0 { entry: %xx = alloca [3 x i8], align 1 store [3 x i8] c"4<\00", ptr %xx, align 1 diff --git a/test/test_suite2/bitstruct/bitstruct_arrays_be.c3t b/test/test_suite2/bitstruct/bitstruct_arrays_be.c3t index 9da77abe2..6cddddf44 100644 --- a/test/test_suite2/bitstruct/bitstruct_arrays_be.c3t +++ b/test/test_suite2/bitstruct/bitstruct_arrays_be.c3t @@ -37,7 +37,7 @@ fn void test3() /* #expect: foo.ll -define void @foo.test3() #0 { +define void @foo_test3() #0 { entry: %xx = alloca [4 x i8], align 1 %xy = alloca [4 x i8], align 1 diff --git a/test/test_suite2/bitstruct/bitstruct_init_bool.c3t b/test/test_suite2/bitstruct/bitstruct_init_bool.c3t index e91b63457..36cc64886 100644 --- a/test/test_suite2/bitstruct/bitstruct_init_bool.c3t +++ b/test/test_suite2/bitstruct/bitstruct_init_bool.c3t @@ -14,7 +14,7 @@ fn void test() /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %f = alloca i32, align 4 store i32 2, ptr %f, align 4 diff --git a/test/test_suite2/bitstruct/bitstruct_to_int.c3t b/test/test_suite2/bitstruct/bitstruct_to_int.c3t index 81c16c9a5..002cee304 100644 --- a/test/test_suite2/bitstruct/bitstruct_to_int.c3t +++ b/test/test_suite2/bitstruct/bitstruct_to_int.c3t @@ -48,7 +48,7 @@ fn void main() /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %b = alloca i32, align 4 %x = alloca i32, align 4 @@ -74,7 +74,7 @@ entry: } ; Function Attrs: nounwind -define void @foo.test2() #0 { +define void @foo_test2() #0 { entry: %b = alloca [4 x i8], align 1 %x = alloca i32, align 4 diff --git a/test/test_suite2/bitstruct/embedded_bitstruct.c3t b/test/test_suite2/bitstruct/embedded_bitstruct.c3t index 5686873dd..7251f004b 100644 --- a/test/test_suite2/bitstruct/embedded_bitstruct.c3t +++ b/test/test_suite2/bitstruct/embedded_bitstruct.c3t @@ -46,7 +46,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %b = alloca %Bar, align 4 %f = alloca %Foo, align 4 @@ -60,7 +60,7 @@ entry: %6 = shl i32 %5, 21 %7 = ashr i32 %6, 23 call void (ptr, ...) @printf(ptr @.str, i32 %3, i32 %7) - call void @llvm.memcpy.p0.p0.i32(ptr align 4 %f, ptr align 4 @.__const.5, i32 16, i1 false) + call void @llvm.memcpy.p0.p0.i32(ptr align 4 %f, ptr align 4 @.__const.10, i32 16, i1 false) %8 = getelementptr inbounds %Foo, ptr %f, i32 0, i32 0 %9 = getelementptr inbounds %anon.1, ptr %8, i32 0, i32 0 %10 = getelementptr inbounds %anon.2, ptr %9, i32 0, i32 0 @@ -74,6 +74,6 @@ entry: %18 = load i32, ptr %17, align 4 %19 = getelementptr inbounds %Foo, ptr %f, i32 0, i32 1 %20 = load i32, ptr %19, align 4 - call void (ptr, ...) @printf(ptr @.str.6, i32 %11, i32 %15, i32 %18, i32 %20) + call void (ptr, ...) @printf(ptr @.str.11, i32 %11, i32 %15, i32 %18, i32 %20) ret void } diff --git a/test/test_suite2/bitstruct/param_bitstruct.c3t b/test/test_suite2/bitstruct/param_bitstruct.c3t index 61a580136..9a4d73336 100644 --- a/test/test_suite2/bitstruct/param_bitstruct.c3t +++ b/test/test_suite2/bitstruct/param_bitstruct.c3t @@ -13,7 +13,7 @@ fn void test(Abc x) /* #expect: foo.ll -define void @foo.test(i32 %0) #0 { +define void @foo_test(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, ptr %x, align 4 diff --git a/test/test_suite2/builtins/simple_builtins.c3t b/test/test_suite2/builtins/simple_builtins.c3t index d18f6dcc0..0f0278cb1 100644 --- a/test/test_suite2/builtins/simple_builtins.c3t +++ b/test/test_suite2/builtins/simple_builtins.c3t @@ -18,7 +18,7 @@ fn int foo(double b) /* #expect: foo.ll -define i32 @foo.foo(double %0) #0 { +define i32 @foo_foo(double %0) #0 { entry: %d = alloca double, align 8 %e = alloca double, align 8 diff --git a/test/test_suite2/cast/top_down_casts.c3t b/test/test_suite2/cast/top_down_casts.c3t index 83038bedd..924aec937 100644 --- a/test/test_suite2/cast/top_down_casts.c3t +++ b/test/test_suite2/cast/top_down_casts.c3t @@ -17,7 +17,7 @@ fn void test() // #expect: top_down_casts.ll -define void @top_down_casts.test() #0 { +define void @top_down_casts_test() #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 diff --git a/test/test_suite2/clang/2002-01_02.c3t b/test/test_suite2/clang/2002-01_02.c3t index fe71a3095..3a3a4de59 100644 --- a/test/test_suite2/clang/2002-01_02.c3t +++ b/test/test_suite2/clang/2002-01_02.c3t @@ -140,31 +140,31 @@ void *[*] data = { &afoo, &abar, &axx }; %Test = type { i16, i16, i32, i32 } %STest2 = type { i32, [4 x i16], double } -@test.array = local_unnamed_addr global [10 x %Foo] zeroinitializer, align 16 -@test.afoo = global double 1.700000e+01, align 8 -@test.abar = global double 1.200000e+01, align 8 -@test.axx = global float 1.200000e+01, align 4 +@test_array = local_unnamed_addr global [10 x %Foo] zeroinitializer, align 16 +@test_afoo = global double 1.700000e+01, align 8 +@test_abar = global double 1.200000e+01, align 8 +@test_axx = global float 1.200000e+01, align 4 @.str = private unnamed_addr constant [5 x i8] c"EXIT\00", align 1 -@test.procnames = local_unnamed_addr global [1 x ptr] [ptr @.str], align 8 -@test.data = local_unnamed_addr global [3 x ptr] [ptr @test.afoo, ptr @test.abar, ptr @test.axx], align 16 +@test_procnames = local_unnamed_addr global [1 x ptr] [ptr @.str], align 8 +@test_data = local_unnamed_addr global [3 x ptr] [ptr @test_afoo, ptr @test_abar, ptr @test_axx], align 16 @.str.6 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 -define void @test.foo() #0 { +define void @test_foo() #0 { entry: ret void } -declare ptr @test.dlclose(ptr) #0 +declare ptr @test_dlclose(ptr) #0 -define void @test.ap_os_dso_unload(ptr %0) #0 { +define void @test_ap_os_dso_unload(ptr %0) #0 { entry: - %1 = call ptr @test.dlclose(ptr %0) + %1 = call ptr @test_dlclose(ptr %0) ret void } declare void @foo2(i32, double, float) #0 -define void @test.bar(i32 %0) #0 { +define void @test_bar(i32 %0) #0 { entry: %intbool = icmp ne i32 %0, 0 %ternary = select i1 %intbool, double 1.000000e+00, double 1.250000e+01 @@ -174,7 +174,7 @@ entry: declare i32 @tolower(i32) #0 -define ptr @test.rangematch(ptr %0, i32 %1, i32 %2) #0 { +define ptr @test_rangematch(ptr %0, i32 %1, i32 %2) #0 { entry: %le = icmp sle i32 %2, %1 %3 = call i32 @tolower(i32 %2) @@ -194,7 +194,7 @@ if.exit: ; preds = %entry declare i32 @foo3(i16) #0 -define void @test.teste2() #0 { +define void @test_teste2() #0 { entry: %xqic = alloca %Foostruct, align 2 store i16 0, ptr %xqic, align 2 @@ -204,7 +204,7 @@ entry: ret void } -define i32 @test.do_merge(ptr %0, ptr %1) #0 { +define i32 @test_do_merge(ptr %0, ptr %1) #0 { entry: %lvalid = alloca i32, align 4 %basel = alloca ptr, align 8 @@ -233,22 +233,22 @@ loop.exit: ; No predecessors! ret i32 1 } -define i32 @test.test(i32 %0) #0 { +define i32 @test_test(i32 %0) #0 { entry: ret i32 %0 } -declare void @test.abc(ptr) #0 +declare void @test_abc(ptr) #0 -define i32 @test.def(i32 %0, i32 %1) #0 { +define i32 @test_def(i32 %0, i32 %1) #0 { entry: %z = alloca i32, align 4 store i32 %1, ptr %z, align 4 - call void @test.abc(ptr %z) + call void @test_abc(ptr %z) ret i32 %0 } -define i32 @test.testing(ptr %0) #0 { +define i32 @test_testing(ptr %0) #0 { entry: %1 = getelementptr inbounds %Test, ptr %0, i32 0, i32 1 %2 = load i16, ptr %1, align 2 @@ -259,7 +259,7 @@ entry: ret i32 %add } -define i32 @test.test2(i32 %0, i64 %1, i32 %2, i32 %3) #0 { +define i32 @test_test2(i32 %0, i64 %1, i32 %2, i32 %3) #0 { entry: %4 = alloca { i64, i32 }, align 8 %5 = getelementptr inbounds { i64, i32 }, ptr %4, i32 0, i32 0 @@ -277,7 +277,7 @@ entry: ret i32 %add2 } -define i32 @test.test3(i64 %0, i32 %1, i64 %2, i32 %3) #0 { +define i32 @test_test3(i64 %0, i32 %1, i64 %2, i32 %3) #0 { entry: %4 = alloca { i64, i32 }, align 8 %5 = alloca { i64, i32 }, align 8 @@ -304,7 +304,7 @@ entry: ret i32 %add2 } -define { i64, i32 } @test.test4(i64 %0, i32 %1) #0 { +define { i64, i32 } @test_test4(i64 %0, i32 %1) #0 { entry: %2 = alloca { i64, i32 }, align 8 %tempcoerce = alloca { i64, i32 }, align 8 @@ -317,7 +317,7 @@ entry: ret { i64, i32 } %5 } -define i32 @test.test6() #0 { +define i32 @test_test6() #0 { entry: %b = alloca [200 x i32], align 16 call void @llvm.memset.p0.i64(ptr align 16 %b, i8 0, i64 800, i1 false) @@ -326,7 +326,7 @@ entry: ret i32 %1 } -define void @test.test7(ptr noalias sret(%STest2) align 8 %0, ptr byval(%STest2) align 8 %1) #0 { +define void @test_test7(ptr noalias sret(%STest2) align 8 %0, ptr byval(%STest2) align 8 %1) #0 { entry: %x = alloca %STest2, align 8 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %x, ptr align 8 %1, i32 24, i1 false) @@ -336,7 +336,7 @@ entry: declare i32 @printf(ptr, ...) #0 -define i32 @test.main2() #0 { +define i32 @test_main2() #0 { entry: %v = alloca i64, align 8 store i64 123455678902, ptr %v, align 8 diff --git a/test/test_suite2/clang/2002-03.c3t b/test/test_suite2/clang/2002-03.c3t index 3bb280f67..23afbbfc7 100644 --- a/test/test_suite2/clang/2002-03.c3t +++ b/test/test_suite2/clang/2002-03.c3t @@ -53,25 +53,25 @@ fn char* foo() { /* #expect: test.ll -@test.a = local_unnamed_addr global { i32, i32, [8 x i32] } { i32 0, i32 2, [8 x i32] zeroinitializer }, align 16 -@test.str = local_unnamed_addr global [10 x i8] c"x\00\00\00\00\00\00\00\00\00", align 1 -@test.arr = local_unnamed_addr global { ptr, ptr, [3 x ptr] } zeroinitializer, align 16 -@test.f = local_unnamed_addr global { float, float, [10 x float] } { float 0x3FF3AE1480000000, float 0x40415999A0000000, [10 x float] zeroinitializer }, align 16 -@test.array = local_unnamed_addr global { %Test, %Test, [8 x %Test] } { %Test { i32 2, double 1.200000e+01 }, %Test { i32 3, double 2.400000e+01 }, [8 x %Test] zeroinitializer }, align 16 -@test.b = local_unnamed_addr global { [4 x i32], { i32, i32, i32, i32 }, { i32, i32, [2 x i32] }, [4 x i32] } { [4 x i32] [i32 1, i32 2, i32 3, i32 4], { i32, i32, i32, i32 } { i32 5, i32 6, i32 7, i32 0 }, { i32, i32, [2 x i32] } { i32 8, i32 9, [2 x i32] zeroinitializer }, [4 x i32] zeroinitializer }, align 16 -@test.link = local_unnamed_addr global [3 x %Connection] [%Connection { i64 1, [10 x i8] c"link1\00\00\00\00\00", i64 10 }, %Connection { i64 2, [10 x i8] c"link2\00\00\00\00\00", i64 20 }, %Connection { i64 3, [10 x i8] c"link3\00\00\00\00\00", i64 30 }], align 16 +@test_a = local_unnamed_addr global { i32, i32, [8 x i32] } { i32 0, i32 2, [8 x i32] zeroinitializer }, align 16 +@test_str = local_unnamed_addr global [10 x i8] c"x\00\00\00\00\00\00\00\00\00", align 1 +@test_arr = local_unnamed_addr global { ptr, ptr, [3 x ptr] } zeroinitializer, align 16 +@test_f = local_unnamed_addr global { float, float, [10 x float] } { float 0x3FF3AE1480000000, float 0x40415999A0000000, [10 x float] zeroinitializer }, align 16 +@test_array = local_unnamed_addr global { %Test, %Test, [8 x %Test] } { %Test { i32 2, double 1.200000e+01 }, %Test { i32 3, double 2.400000e+01 }, [8 x %Test] zeroinitializer }, align 16 +@test_b = local_unnamed_addr global { [4 x i32], { i32, i32, i32, i32 }, { i32, i32, [2 x i32] }, [4 x i32] } { [4 x i32] [i32 1, i32 2, i32 3, i32 4], { i32, i32, i32, i32 } { i32 5, i32 6, i32 7, i32 0 }, { i32, i32, [2 x i32] } { i32 8, i32 9, [2 x i32] zeroinitializer }, [4 x i32] zeroinitializer }, align 16 +@test_link = local_unnamed_addr global [3 x %Connection] [%Connection { i64 1, [10 x i8] c"link1\00\00\00\00\00", i64 10 }, %Connection { i64 2, [10 x i8] c"link2\00\00\00\00\00", i64 20 }, %Connection { i64 3, [10 x i8] c"link3\00\00\00\00\00", i64 30 }], align 16 @.str = private unnamed_addr constant [4 x i8] c"\1F\C2\8B\00", align 1 @.str.7 = private unnamed_addr constant [32 x i8] c"*** Word \22%s\22 on line %d is not\00", align 1 -declare i32 @test.strcmp(ptr, ptr) #0 +declare i32 @test_strcmp(ptr, ptr) #0 -define i32 @test.test(ptr %0) #0 { +define i32 @test_test(ptr %0) #0 { entry: - %1 = call i32 @test.strcmp(ptr %0, ptr @.str) + %1 = call i32 @test_strcmp(ptr %0, ptr @.str) ret i32 %1 } -define i32 @test.trys(ptr %0, i32 %1) #0 { +define i32 @test_trys(ptr %0, i32 %1) #0 { entry: %asa = alloca i32, align 4 %val = alloca double, align 8 diff --git a/test/test_suite2/clang/2002-04.c3t b/test/test_suite2/clang/2002-04.c3t index 2731cae66..5f7b3b9ee 100644 --- a/test/test_suite2/clang/2002-04.c3t +++ b/test/test_suite2/clang/2002-04.c3t @@ -68,7 +68,7 @@ fn void test2(FooSt y) { /* #expect: test.ll -define i32 @test.main2() #0 { +define i32 @test_main2() #0 { entry: %switch = alloca i32, align 4 br label %loop.cond @@ -110,7 +110,7 @@ loop.exit: ; preds = %loop.cond ret i32 0 } -define double @test.test(i32 %0) #0 { +define double @test_test(i32 %0) #0 { entry: %student_t = alloca [30 x double], align 16 call void @llvm.memcpy.p0.p0.i32(ptr align 16 %student_t, ptr align 16 @.__const, i32 240, i1 false) @@ -120,7 +120,7 @@ entry: ret double %2 } -define void @test.loop() #0 { +define void @test_loop() #0 { entry: %result = alloca %St, align 4 %0 = call i64 @func_returning_struct() @@ -132,14 +132,14 @@ declare i32 @testF(ptr byval(%FooSt) align 8, float) #0 declare i32 @testE(i8 zeroext, i16 signext, i8 zeroext, i32, i32, float) #0 -define void @test.test3(ptr %0) #0 { +define void @test_test3(ptr %0) #0 { entry: %1 = getelementptr inbounds %FooSt, ptr %0, i32 0, i32 1 store i16 1, ptr %1, align 2 ret void } -define void @test.test2(ptr byval(%FooSt) align 8 %0) #0 { +define void @test_test2(ptr byval(%FooSt) align 8 %0) #0 { entry: %y = alloca %FooSt, align 4 %indirectarg = alloca %FooSt, align 8 @@ -160,7 +160,7 @@ entry: call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg, ptr align 4 %y, i32 20, i1 false) %12 = call i32 @testF(ptr byval(%FooSt) align 8 %indirectarg, float 0x3FB99999A0000000) call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg1, ptr align 4 %y, i32 20, i1 false) - call void @test.test2(ptr byval(%FooSt) align 8 %indirectarg1) - call void @test.test3(ptr %y) + call void @test_test2(ptr byval(%FooSt) align 8 %indirectarg1) + call void @test_test3(ptr %y) ret void } diff --git a/test/test_suite2/compile_time/compile_time_array.c3t b/test/test_suite2/compile_time/compile_time_array.c3t index c108d0651..412ce0b29 100644 --- a/test/test_suite2/compile_time/compile_time_array.c3t +++ b/test/test_suite2/compile_time/compile_time_array.c3t @@ -18,7 +18,7 @@ fn void test() @.str = private unnamed_addr constant [2 x i8] c"a\00", align 1 ; Function Attrs: nounwind -define void @test.test() #0 { +define void @test_test() #0 { entry: %x = alloca i32, align 4 %z = alloca %"char[]", align 8 diff --git a/test/test_suite2/compile_time/compile_time_array_ref.c3t b/test/test_suite2/compile_time/compile_time_array_ref.c3t index 05f80290c..2955ab0db 100644 --- a/test/test_suite2/compile_time/compile_time_array_ref.c3t +++ b/test/test_suite2/compile_time/compile_time_array_ref.c3t @@ -12,13 +12,7 @@ fn void test() /* #expect: foo.ll -@foo.stack = local_unnamed_addr global [8192 x i8] zeroinitializer, align 16 -@foo.x = local_unnamed_addr global ptr getelementptr (i8, ptr @foo.stack, i64 1000), align 8 -@test.y = internal unnamed_addr global [2 x i8] zeroinitializer, align 1 -@test.z = internal unnamed_addr global ptr getelementptr inbounds ([2 x i8], ptr @test.y, i64 0, i64 1), align 8 - -; Function Attrs: nounwind -define void @foo.test() #0 { -entry: - ret void -} \ No newline at end of file +@foo_stack = local_unnamed_addr global [8192 x i8] zeroinitializer, align 16 +@foo_x = local_unnamed_addr global ptr getelementptr (i8, ptr @foo_stack, i64 1000), align 8 +@"test$y" = internal unnamed_addr global [2 x i8] zeroinitializer, align 1 +@"test$z" = internal unnamed_addr global ptr getelementptr inbounds ([2 x i8], ptr @"test$y", i64 0, i64 1), align 8 \ No newline at end of file diff --git a/test/test_suite2/compile_time/compile_time_bitops.c3t b/test/test_suite2/compile_time/compile_time_bitops.c3t index 573a5aac9..92f924f2b 100644 --- a/test/test_suite2/compile_time/compile_time_bitops.c3t +++ b/test/test_suite2/compile_time/compile_time_bitops.c3t @@ -10,9 +10,9 @@ int y3 = ~4; /* #expect: foo.ll -@foo.x1 = local_unnamed_addr global i32 6, align 4 -@foo.x2 = local_unnamed_addr global i32 6, align 4 -@foo.x3 = local_unnamed_addr global i32 0, align 4 -@foo.y1 = local_unnamed_addr global i32 16, align 4 -@foo.y2 = local_unnamed_addr global i32 1, align 4 -@foo.y3 = local_unnamed_addr global i32 -5, align 4 \ No newline at end of file +@foo_x1 = local_unnamed_addr global i32 6, align 4 +@foo_x2 = local_unnamed_addr global i32 6, align 4 +@foo_x3 = local_unnamed_addr global i32 0, align 4 +@foo_y1 = local_unnamed_addr global i32 16, align 4 +@foo_y2 = local_unnamed_addr global i32 1, align 4 +@foo_y3 = local_unnamed_addr global i32 -5, align 4 \ No newline at end of file diff --git a/test/test_suite2/compile_time/compile_time_ptr_ref.c3t b/test/test_suite2/compile_time/compile_time_ptr_ref.c3t index 730c96eb3..e4fc87bf1 100644 --- a/test/test_suite2/compile_time/compile_time_ptr_ref.c3t +++ b/test/test_suite2/compile_time/compile_time_ptr_ref.c3t @@ -13,10 +13,10 @@ int ptr = 0; %"int*[]" = type { ptr, i64 } -@.taddr = private global [5 x ptr] [ptr @test.ptr, ptr @test.ptr, ptr getelementptr inbounds (i32, ptr @test.ptr, i64 1), ptr getelementptr (i32, ptr @test.ptr, i64 -1), ptr getelementptr (i8, ptr @test.ptr, i64 -4)], align 8 -@test.blurp = local_unnamed_addr global %"int*[]" { ptr @.taddr, i64 5 }, align 8 -@test.c = local_unnamed_addr global ptr getelementptr (i8, ptr @test.ptr, i64 -4), align 8 -@test.c2 = local_unnamed_addr global ptr getelementptr (i8, ptr @test.ptr, i64 4), align 8 -@test.c3 = local_unnamed_addr global ptr getelementptr (i8, ptr @test.ptr, i64 4), align 8 -@test.ff = local_unnamed_addr global i64 ptrtoint (ptr @test.ptr to i64), align 8 -@test.ptr = global i32 0, align 4 \ No newline at end of file +@.taddr = private global [5 x ptr] [ptr @test_ptr, ptr @test_ptr, ptr getelementptr inbounds (i32, ptr @test_ptr, i64 1), ptr getelementptr (i32, ptr @test_ptr, i64 -1), ptr getelementptr (i8, ptr @test_ptr, i64 -4)], align 8 +@test_blurp = local_unnamed_addr global %"int*[]" { ptr @.taddr, i64 5 }, align 8 +@test_c = local_unnamed_addr global ptr getelementptr (i8, ptr @test_ptr, i64 -4), align 8 +@test_c2 = local_unnamed_addr global ptr getelementptr (i8, ptr @test_ptr, i64 4), align 8 +@test_c3 = local_unnamed_addr global ptr getelementptr (i8, ptr @test_ptr, i64 4), align 8 +@test_ff = local_unnamed_addr global i64 ptrtoint (ptr @test_ptr to i64), align 8 +@test_ptr = global i32 0, align 4 \ No newline at end of file diff --git a/test/test_suite2/compile_time/ct_eval.c3t b/test/test_suite2/compile_time/ct_eval.c3t index e9fea6cb2..b874f45d1 100644 --- a/test/test_suite2/compile_time/ct_eval.c3t +++ b/test/test_suite2/compile_time/ct_eval.c3t @@ -11,7 +11,7 @@ fn void main() } /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %abc = alloca i32, align 4 store i32 20, ptr %abc, align 4 diff --git a/test/test_suite2/compile_time/ct_for.c3t b/test/test_suite2/compile_time/ct_for.c3t index 93dbb262b..90a5a5fff 100644 --- a/test/test_suite2/compile_time/ct_for.c3t +++ b/test/test_suite2/compile_time/ct_for.c3t @@ -19,7 +19,7 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: call void (ptr, ...) @printf(ptr @.str, i32 0) call void (ptr, ...) @printf(ptr @.str.1, i32 1) diff --git a/test/test_suite2/compile_time/ct_foreach.c3t b/test/test_suite2/compile_time/ct_foreach.c3t index 71649bb19..752a86234 100644 --- a/test/test_suite2/compile_time/ct_foreach.c3t +++ b/test/test_suite2/compile_time/ct_foreach.c3t @@ -28,7 +28,7 @@ fn void main() } /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %z = alloca i32, align 4 %z1 = alloca ptr, align 8 diff --git a/test/test_suite2/compile_time/ct_if.c3t b/test/test_suite2/compile_time/ct_if.c3t index 4432be030..296572c9a 100644 --- a/test/test_suite2/compile_time/ct_if.c3t +++ b/test/test_suite2/compile_time/ct_if.c3t @@ -58,8 +58,8 @@ $endif; // #expect: ct_if.ll -@ct_if.d = local_unnamed_addr global i32 5, align 4 -@ct_if.c = local_unnamed_addr global i32 5, align 4 -@ct_if.b = local_unnamed_addr global i32 4, align 4 -@ct_if.a = local_unnamed_addr global i32 3, align 4 -@ct_if.x = local_unnamed_addr global i32 1, align 4 \ No newline at end of file +@ct_if_d = local_unnamed_addr global i32 5, align 4 +@ct_if_c = local_unnamed_addr global i32 5, align 4 +@ct_if_b = local_unnamed_addr global i32 4, align 4 +@ct_if_a = local_unnamed_addr global i32 3, align 4 +@ct_if_x = local_unnamed_addr global i32 1, align 4 \ No newline at end of file diff --git a/test/test_suite2/compile_time/ct_switch.c3t b/test/test_suite2/compile_time/ct_switch.c3t index cdb8032a2..9a832eb98 100644 --- a/test/test_suite2/compile_time/ct_switch.c3t +++ b/test/test_suite2/compile_time/ct_switch.c3t @@ -54,7 +54,7 @@ fn void main() declare void @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: call void (ptr, ...) @printf(ptr @.str, ptr @.str.1) call void (ptr, ...) @printf(ptr @.str.2, ptr @.str.3) diff --git a/test/test_suite2/compile_time/ct_switch_top_level.c3t b/test/test_suite2/compile_time/ct_switch_top_level.c3t index a16e494bc..63c79fb90 100644 --- a/test/test_suite2/compile_time/ct_switch_top_level.c3t +++ b/test/test_suite2/compile_time/ct_switch_top_level.c3t @@ -36,7 +36,7 @@ source_filename = "test" target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" -@test.oeoekgokege = local_unnamed_addr global i32 343432, align 4 +@test_oeoekgokege = local_unnamed_addr global i32 343432, align 4 @.str = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"Hello\0A\00", align 1 diff --git a/test/test_suite2/compile_time/ct_switch_type_check.c3t b/test/test_suite2/compile_time/ct_switch_type_check.c3t index 740caf557..69a492928 100644 --- a/test/test_suite2/compile_time/ct_switch_type_check.c3t +++ b/test/test_suite2/compile_time/ct_switch_type_check.c3t @@ -37,7 +37,7 @@ fn void main() declare void @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: call void (ptr, ...) @printf(ptr @.str, ptr @.str.1) call void (ptr, ...) @printf(ptr @.str.2, ptr @.str.3) diff --git a/test/test_suite2/compile_time/stringify.c3t b/test/test_suite2/compile_time/stringify.c3t index 33ea827b7..81eb7f989 100644 --- a/test/test_suite2/compile_time/stringify.c3t +++ b/test/test_suite2/compile_time/stringify.c3t @@ -42,7 +42,7 @@ fn void main() @.str.4 = private unnamed_addr constant [10 x i8] c"1 + 3 + a\00", align 1 @.str.5 = private unnamed_addr constant [15 x i8] c"Result was %d\0A\00", align 1 -define void @test.test() #0 { +define void @test_test() #0 { entry: %i = alloca i32, align 4 store i32 0, ptr %i, align 4 @@ -65,7 +65,7 @@ loop.exit: ; preds = %loop.cond ret void } -define void @test.main() #0 { +define void @test_main() #0 { entry: %t = alloca i64, align 8 %diff = alloca i64, align 8 @@ -76,7 +76,7 @@ entry: %diff2 = alloca i64, align 8 %0 = call i64 @clock() store i64 %0, ptr %t, align 8 - call void @test.test() + call void @test_test() %1 = call i64 @clock() %2 = load i64, ptr %t, align 8 %sub = sub i64 %1, %2 @@ -104,6 +104,6 @@ entry: define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @test.main() + call void @test_main() ret i32 0 } diff --git a/test/test_suite2/compile_time/ternary_folding.c3t b/test/test_suite2/compile_time/ternary_folding.c3t index 79af822c7..796e96748 100644 --- a/test/test_suite2/compile_time/ternary_folding.c3t +++ b/test/test_suite2/compile_time/ternary_folding.c3t @@ -13,11 +13,11 @@ fn int test2() { return 3; } // #expect: ternary_folding.ll -@ternary_folding.foo = local_unnamed_addr global i32 1, align 4 -@ternary_folding.bar = local_unnamed_addr global double 2.000000e+00, align 8 -@ternary_folding.baz = local_unnamed_addr global i8 0, align 1 +@ternary_folding_foo = local_unnamed_addr global i32 1, align 4 +@ternary_folding_bar = local_unnamed_addr global double 2.000000e+00, align 8 +@ternary_folding_baz = local_unnamed_addr global i8 0, align 1 -define void @ternary_folding.test() #0 { +define void @ternary_folding_test() #0 { entry: %x = alloca i32, align 4 store i32 0, ptr %x, align 4 diff --git a/test/test_suite2/compile_time_introspection/alignof.c3t b/test/test_suite2/compile_time_introspection/alignof.c3t index 42cd77311..12f3530e1 100644 --- a/test/test_suite2/compile_time_introspection/alignof.c3t +++ b/test/test_suite2/compile_time_introspection/alignof.c3t @@ -65,26 +65,26 @@ int z05 = $alignof(Foob.c[5]); // #expect: foo.ll -@foo.x = local_unnamed_addr global i64 16, align 8 -@foo.y = local_unnamed_addr global i16 8, align 2 -@foo.z = local_unnamed_addr global i32 8, align 4 -@foo.w = local_unnamed_addr global i32 8, align 4 -@foo.v = local_unnamed_addr global i32 4, align 4 -@foo.x1 = local_unnamed_addr global i32 8, align 4 -@foo.x2 = local_unnamed_addr global i32 8, align 4 -@foo.x3 = local_unnamed_addr global i32 1, align 4 -@foo.x4 = local_unnamed_addr global i32 4, align 4 -@foo.x5 = local_unnamed_addr global i32 4, align 4 -@foo.x6 = local_unnamed_addr global i32 4, align 4 -@foo.x7 = local_unnamed_addr global i32 4, align 4 -@foo.x8 = local_unnamed_addr global i32 8, align 4 -@foo.x9 = local_unnamed_addr global i32 4, align 4 -@foo.x10 = local_unnamed_addr global i32 4, align 4 -@foo.x11 = local_unnamed_addr global i32 4, align 4 -@foo.z0 = local_unnamed_addr global i32 8, align 4 -@foo.z00 = local_unnamed_addr global i32 8, align 4 -@foo.z01 = local_unnamed_addr global i32 1, align 4 -@foo.z02 = local_unnamed_addr global i32 2, align 4 -@foo.z03 = local_unnamed_addr global i32 1, align 4 -@foo.z04 = local_unnamed_addr global i32 4, align 4 -@foo.z05 = local_unnamed_addr global i32 1, align 4 \ No newline at end of file +@foo_x = local_unnamed_addr global i64 16, align 8 +@foo_y = local_unnamed_addr global i16 8, align 2 +@foo_z = local_unnamed_addr global i32 8, align 4 +@foo_w = local_unnamed_addr global i32 8, align 4 +@foo_v = local_unnamed_addr global i32 4, align 4 +@foo_x1 = local_unnamed_addr global i32 8, align 4 +@foo_x2 = local_unnamed_addr global i32 8, align 4 +@foo_x3 = local_unnamed_addr global i32 1, align 4 +@foo_x4 = local_unnamed_addr global i32 4, align 4 +@foo_x5 = local_unnamed_addr global i32 4, align 4 +@foo_x6 = local_unnamed_addr global i32 4, align 4 +@foo_x7 = local_unnamed_addr global i32 4, align 4 +@foo_x8 = local_unnamed_addr global i32 8, align 4 +@foo_x9 = local_unnamed_addr global i32 4, align 4 +@foo_x10 = local_unnamed_addr global i32 4, align 4 +@foo_x11 = local_unnamed_addr global i32 4, align 4 +@foo_z0 = local_unnamed_addr global i32 8, align 4 +@foo_z00 = local_unnamed_addr global i32 8, align 4 +@foo_z01 = local_unnamed_addr global i32 1, align 4 +@foo_z02 = local_unnamed_addr global i32 2, align 4 +@foo_z03 = local_unnamed_addr global i32 1, align 4 +@foo_z04 = local_unnamed_addr global i32 4, align 4 +@foo_z05 = local_unnamed_addr global i32 1, align 4 \ No newline at end of file diff --git a/test/test_suite2/compile_time_introspection/defined.c3t b/test/test_suite2/compile_time_introspection/defined.c3t index 452418a72..8b3a5fe9e 100644 --- a/test/test_suite2/compile_time_introspection/defined.c3t +++ b/test/test_suite2/compile_time_introspection/defined.c3t @@ -61,7 +61,7 @@ fn void main() /* #expect: mymodule.ll -define void @mymodule.main() #0 { +define void @mymodule_main() #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 diff --git a/test/test_suite2/compile_time_introspection/defined_builtin.c3t b/test/test_suite2/compile_time_introspection/defined_builtin.c3t index c7dc9d835..582b62f50 100644 --- a/test/test_suite2/compile_time_introspection/defined_builtin.c3t +++ b/test/test_suite2/compile_time_introspection/defined_builtin.c3t @@ -8,7 +8,7 @@ fn void test() /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %a = alloca i8, align 1 %b = alloca i8, align 1 diff --git a/test/test_suite2/compile_time_introspection/nameof.c3t b/test/test_suite2/compile_time_introspection/nameof.c3t index 15955b697..c8eecbcea 100644 --- a/test/test_suite2/compile_time_introspection/nameof.c3t +++ b/test/test_suite2/compile_time_introspection/nameof.c3t @@ -43,9 +43,9 @@ fn void main() @.str.6 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.7 = private unnamed_addr constant [4 x i8] c"Foo\00", align 1 @.str.8 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.9 = private unnamed_addr constant [13 x i8] c"mymodule.Foo\00", align 1 +@.str.9 = private unnamed_addr constant [13 x i8] c"mymodule_Foo\00", align 1 @.str.10 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.11 = private unnamed_addr constant [13 x i8] c"mymodule.Foo\00", align 1 +@.str.11 = private unnamed_addr constant [13 x i8] c"mymodule_Foo\00", align 1 @.str.12 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.13 = private unnamed_addr constant [12 x i8] c"mymodule::b\00", align 1 @.str.14 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @@ -55,9 +55,9 @@ fn void main() @.str.18 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.19 = private unnamed_addr constant [2 x i8] c"b\00", align 1 @.str.20 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.21 = private unnamed_addr constant [11 x i8] c"mymodule.b\00", align 1 +@.str.21 = private unnamed_addr constant [11 x i8] c"mymodule_b\00", align 1 @.str.22 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 -@.str.23 = private unnamed_addr constant [11 x i8] c"mymodule.b\00", align 1 +@.str.23 = private unnamed_addr constant [11 x i8] c"mymodule_b\00", align 1 @.str.24 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 @.str.25 = private unnamed_addr constant [2 x i8] c"a\00", align 1 @.str.26 = private unnamed_addr constant [4 x i8] c"%s\0A\00", align 1 diff --git a/test/test_suite2/compile_time_introspection/offsetof.c3t b/test/test_suite2/compile_time_introspection/offsetof.c3t index 456bb1cb8..7a31f7f53 100644 --- a/test/test_suite2/compile_time_introspection/offsetof.c3t +++ b/test/test_suite2/compile_time_introspection/offsetof.c3t @@ -53,18 +53,18 @@ int z02 = $offsetof(Foob.c[5]); int z03 = $offsetof(Foob.a); // #expect: foo.ll -@foo.y = local_unnamed_addr global i16 16, align 2 -@foo.z = local_unnamed_addr global i32 16, align 4 -@foo.w = local_unnamed_addr global i32 16, align 4 -@foo.x1 = local_unnamed_addr global i32 3, align 4 -@foo.x2 = local_unnamed_addr global i32 4, align 4 -@foo.x4 = local_unnamed_addr global i32 16, align 4 -@foo.x6 = local_unnamed_addr global i32 20, align 4 -@foo.x5 = local_unnamed_addr global i32 16, align 4 -@foo.x7 = local_unnamed_addr global i32 28, align 4 -@foo.x8 = local_unnamed_addr global i32 24, align 4 -@foo.z0 = local_unnamed_addr global i32 0, align 4 -@foo.z00 = local_unnamed_addr global i32 0, align 4 -@foo.z01 = local_unnamed_addr global i32 1, align 4 -@foo.z02 = local_unnamed_addr global i32 5, align 4 -@foo.z03 = local_unnamed_addr global i32 0, align 4 +@foo_y = local_unnamed_addr global i16 16, align 2 +@foo_z = local_unnamed_addr global i32 16, align 4 +@foo_w = local_unnamed_addr global i32 16, align 4 +@foo_x1 = local_unnamed_addr global i32 3, align 4 +@foo_x2 = local_unnamed_addr global i32 4, align 4 +@foo_x4 = local_unnamed_addr global i32 16, align 4 +@foo_x6 = local_unnamed_addr global i32 20, align 4 +@foo_x5 = local_unnamed_addr global i32 16, align 4 +@foo_x7 = local_unnamed_addr global i32 28, align 4 +@foo_x8 = local_unnamed_addr global i32 24, align 4 +@foo_z0 = local_unnamed_addr global i32 0, align 4 +@foo_z00 = local_unnamed_addr global i32 0, align 4 +@foo_z01 = local_unnamed_addr global i32 1, align 4 +@foo_z02 = local_unnamed_addr global i32 5, align 4 +@foo_z03 = local_unnamed_addr global i32 0, align 4 diff --git a/test/test_suite2/compile_time_introspection/qnameof.c3t b/test/test_suite2/compile_time_introspection/qnameof.c3t index f02d63c9b..a7c0a6d91 100644 --- a/test/test_suite2/compile_time_introspection/qnameof.c3t +++ b/test/test_suite2/compile_time_introspection/qnameof.c3t @@ -1,3 +1,4 @@ +// #target: macos-x64 module qnametest; extern fn int printf(char *, ...); @@ -21,8 +22,8 @@ fn void main() /* #expect: qnametest.ll -@.typeid.qnametest.Blob = linkonce constant { i8, i64 } { i8 10, i64 2 }, comdat, align 8 -@qnametest.x = local_unnamed_addr global i32 0, align 4 +@"ct$qnametest_Blob" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@qnametest_x = local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [12 x i8] c"printf: %s\0A\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"printf\00", align 1 @.str.2 = private unnamed_addr constant [13 x i8] c"printfq: %s\0A\00", align 1 @@ -42,7 +43,7 @@ fn void main() @.str.16 = private unnamed_addr constant [15 x i8] c"Blob**[3]: %s\0A\00", align 1 @.str.17 = private unnamed_addr constant [10 x i8] c"Blob**[3]\00", align 1 -define void @qnametest.main() #0 { +define void @qnametest_main() #0 { entry: %help = alloca i32, align 4 store i32 0, ptr %help, align 4 diff --git a/test/test_suite2/compile_time_introspection/sizeof.c3t b/test/test_suite2/compile_time_introspection/sizeof.c3t index 772d36ae2..531ab71eb 100644 --- a/test/test_suite2/compile_time_introspection/sizeof.c3t +++ b/test/test_suite2/compile_time_introspection/sizeof.c3t @@ -48,19 +48,19 @@ struct Foo // #expect: foo.ll -@foo.x = local_unnamed_addr global i64 64, align 8 -@foo.y = local_unnamed_addr global i16 64, align 2 -@foo.z = local_unnamed_addr global i32 64, align 4 -@foo.w = local_unnamed_addr global i32 64, align 4 -@foo.v = local_unnamed_addr global i32 1, align 4 -@foo.x1 = local_unnamed_addr global i32 8, align 4 -@foo.y1 = local_unnamed_addr global i32 2, align 4 -@foo.a = local_unnamed_addr global i32 60, align 4 -@foo.b = local_unnamed_addr global i32 5, align 4 -@foo.c = local_unnamed_addr global i32 5, align 4 -@foo.d = local_unnamed_addr global i32 1600, align 4 -@foo.e = local_unnamed_addr global i32 8, align 4 -@foo.a2 = local_unnamed_addr global i32 60, align 4 -@foo.a3 = local_unnamed_addr global i32 60, align 4 -@foo.a4 = local_unnamed_addr global i32 60, align 4 -@foo.a5 = local_unnamed_addr global i32 60, align 4 \ No newline at end of file +@foo_x = local_unnamed_addr global i64 64, align 8 +@foo_y = local_unnamed_addr global i16 64, align 2 +@foo_z = local_unnamed_addr global i32 64, align 4 +@foo_w = local_unnamed_addr global i32 64, align 4 +@foo_v = local_unnamed_addr global i32 1, align 4 +@foo_x1 = local_unnamed_addr global i32 8, align 4 +@foo_y1 = local_unnamed_addr global i32 2, align 4 +@foo_a = local_unnamed_addr global i32 60, align 4 +@foo_b = local_unnamed_addr global i32 5, align 4 +@foo_c = local_unnamed_addr global i32 5, align 4 +@foo_d = local_unnamed_addr global i32 1600, align 4 +@foo_e = local_unnamed_addr global i32 8, align 4 +@foo_a2 = local_unnamed_addr global i32 60, align 4 +@foo_a3 = local_unnamed_addr global i32 60, align 4 +@foo_a4 = local_unnamed_addr global i32 60, align 4 +@foo_a5 = local_unnamed_addr global i32 60, align 4 \ No newline at end of file diff --git a/test/test_suite2/constants/byte_literals.c3t b/test/test_suite2/constants/byte_literals.c3t index 1a68db76d..211c5974c 100644 --- a/test/test_suite2/constants/byte_literals.c3t +++ b/test/test_suite2/constants/byte_literals.c3t @@ -6,8 +6,8 @@ char[*] foo64 = b64"SGVsbG8gV29ybGQ="; // #expect: byte_literals.ll -@byte_literals.foob = local_unnamed_addr global [1 x i8] c"\A0", align 1 -@byte_literals.fooz = local_unnamed_addr global [7 x i8] c"\00\AA\BB\CC\DD\EE\FF", align 1 -@byte_literals.fooy = local_unnamed_addr global [4 x i8] c"\DE\AD\BE\EF", align 1 -@byte_literals.foow = local_unnamed_addr global [5 x i8] c"EI#M\ED", align 1 -@byte_literals.foo64 = local_unnamed_addr global [11 x i8] c"Hello World", align 1 +@byte_literals_foob = local_unnamed_addr global [1 x i8] c"\A0", align 1 +@byte_literals_fooz = local_unnamed_addr global [7 x i8] c"\00\AA\BB\CC\DD\EE\FF", align 1 +@byte_literals_fooy = local_unnamed_addr global [4 x i8] c"\DE\AD\BE\EF", align 1 +@byte_literals_foow = local_unnamed_addr global [5 x i8] c"EI#M\ED", align 1 +@byte_literals_foo64 = local_unnamed_addr global [11 x i8] c"Hello World", align 1 diff --git a/test/test_suite2/constants/char_literals.c3t b/test/test_suite2/constants/char_literals.c3t index c4bbb0d6b..a4ed8ce35 100644 --- a/test/test_suite2/constants/char_literals.c3t +++ b/test/test_suite2/constants/char_literals.c3t @@ -13,12 +13,12 @@ char i = '\e'; // #expect: test.ll -@test.a = local_unnamed_addr global i8 32, align 1 -@test.b = local_unnamed_addr global i8 13, align 1 -@test.c = local_unnamed_addr global i8 9, align 1 -@test.d = local_unnamed_addr global i8 10, align 1 -@test.e = local_unnamed_addr global i8 0, align 1 -@test.f = local_unnamed_addr global i8 39, align 1 -@test.g = local_unnamed_addr global i8 34, align 1 -@test.h = local_unnamed_addr global i8 92, align 1 -@test.i = local_unnamed_addr global i8 27, align 1 +@test_a = local_unnamed_addr global i8 32, align 1 +@test_b = local_unnamed_addr global i8 13, align 1 +@test_c = local_unnamed_addr global i8 9, align 1 +@test_d = local_unnamed_addr global i8 10, align 1 +@test_e = local_unnamed_addr global i8 0, align 1 +@test_f = local_unnamed_addr global i8 39, align 1 +@test_g = local_unnamed_addr global i8 34, align 1 +@test_h = local_unnamed_addr global i8 92, align 1 +@test_i = local_unnamed_addr global i8 27, align 1 diff --git a/test/test_suite2/constants/const_var_copy.c3t b/test/test_suite2/constants/const_var_copy.c3t index 739041889..045a7cf47 100644 --- a/test/test_suite2/constants/const_var_copy.c3t +++ b/test/test_suite2/constants/const_var_copy.c3t @@ -11,15 +11,15 @@ fn void test(int z) /* #expect: foo.ll -@foo.FOO = local_unnamed_addr constant { [50 x i8], i8, [49 x i8] } { [50 x i8] zeroinitializer, i8 1, [49 x i8] zeroinitializer }, align 16 -@foo.BAR = local_unnamed_addr constant <4 x i32> , align 16 +@foo_FOO = local_unnamed_addr constant { [50 x i8], i8, [49 x i8] } { [50 x i8] zeroinitializer, i8 1, [49 x i8] zeroinitializer }, align 16 +@foo_BAR = local_unnamed_addr constant <4 x i32> , align 16 -define void @foo.test(i32 %0) #0 { +define void @foo_test(i32 %0) #0 { entry: %s = alloca i8, align 1 %zd = alloca i32, align 4 %sisiext = sext i32 %0 to i64 - %1 = getelementptr inbounds [100 x i8], ptr @foo.FOO, i64 0, i64 %sisiext + %1 = getelementptr inbounds [100 x i8], ptr @foo_FOO, i64 0, i64 %sisiext %2 = load i8, ptr %1, align 1 store i8 %2, ptr %s, align 1 %sisiext1 = sext i32 %0 to i64 diff --git a/test/test_suite2/constants/constants.c3t b/test/test_suite2/constants/constants.c3t index 99078d3fd..882be8e03 100644 --- a/test/test_suite2/constants/constants.c3t +++ b/test/test_suite2/constants/constants.c3t @@ -19,16 +19,16 @@ fn void test() /* #expect: constants.ll -@constants.AA = protected unnamed_addr constant i8 -1, align 1 -@constants.BB = local_unnamed_addr constant i8 -56, align 1 -@constants.CC = protected unnamed_addr constant i32 -1, align 4 -@constants.DD = protected unnamed_addr constant i32 -1, align 4 -@constants.FOO = protected unnamed_addr constant i32 -1, align 4 -@constants.x = protected unnamed_addr global i32 255, align 4 -@constants.z = protected unnamed_addr global i32 -1, align 4 -@constants.w = protected unnamed_addr global i8 -1, align 1 -@constants.v = protected unnamed_addr global i16 -1, align 2 -@constants.z2 = protected unnamed_addr global i32 -1, align 4 +@constants_AA = protected unnamed_addr constant i8 -1, align 1 +@constants_BB = local_unnamed_addr constant i8 -56, align 1 +@constants_CC = protected unnamed_addr constant i32 -1, align 4 +@constants_DD = protected unnamed_addr constant i32 -1, align 4 +@constants_FOO = protected unnamed_addr constant i32 -1, align 4 +@constants_x = protected unnamed_addr global i32 255, align 4 +@constants_z = protected unnamed_addr global i32 -1, align 4 +@constants_w = protected unnamed_addr global i8 -1, align 1 +@constants_v = protected unnamed_addr global i16 -1, align 2 +@constants_z2 = protected unnamed_addr global i32 -1, align 4 entry: %xx = alloca i32, align 4 diff --git a/test/test_suite2/contracts/simple_test.c3t b/test/test_suite2/contracts/simple_test.c3t index 0cce0f217..1406ba202 100644 --- a/test/test_suite2/contracts/simple_test.c3t +++ b/test/test_suite2/contracts/simple_test.c3t @@ -43,7 +43,7 @@ fn void main() /* #expect: simple_test.ll -define void @simple_test.test(ptr %0, i32 %1) #0 { +define void @simple_test_test(ptr %0, i32 %1) #0 { entry: %gt = icmp sgt i32 %1, 100 call void @llvm.assume(i1 %gt) @@ -51,7 +51,7 @@ entry: ret void } -define i32 @simple_test.test2(ptr %0, i32 %1) #0 { +define i32 @simple_test_test2(ptr %0, i32 %1) #0 { entry: %gt = icmp sgt i32 %1, 100 call void @llvm.assume(i1 %gt) @@ -61,7 +61,7 @@ entry: ret i32 %1 } -define i32 @simple_test.test3(i32 %0) #0 { +define i32 @simple_test_test3(i32 %0) #0 { entry: %gt = icmp sgt i32 %0, 0 call void @llvm.assume(i1 %gt) @@ -71,13 +71,13 @@ entry: ret i32 %add } -define void @simple_test.main() #0 { +define void @simple_test_main() #0 { entry: %fooofke = alloca i32, align 4 store i32 0, ptr %fooofke, align 4 - call void @simple_test.test(ptr %fooofke, i32 330) - %0 = call i32 @simple_test.test2(ptr %fooofke, i32 150) - %1 = call i32 @simple_test.test3(i32 123) + call void @simple_test_test(ptr %fooofke, i32 330) + %0 = call i32 @simple_test_test2(ptr %fooofke, i32 150) + %1 = call i32 @simple_test_test3(i32 123) %2 = load i32, ptr %fooofke, align 4 call void (ptr, ...) @printf(ptr @.str, i32 %2) ret void @@ -85,6 +85,6 @@ entry: define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @simple_test.main() + call void @simple_test_main() ret i32 0 } \ No newline at end of file diff --git a/test/test_suite2/debug_symbols/constants.c3t b/test/test_suite2/debug_symbols/constants.c3t index 37a0229ee..c90334e96 100644 --- a/test/test_suite2/debug_symbols/constants.c3t +++ b/test/test_suite2/debug_symbols/constants.c3t @@ -7,22 +7,22 @@ private const FOO = ~(uint)(0); /* #expect: constants.ll -@constants.AA = protected unnamed_addr constant i8 1, align 1 -@constants.BB = local_unnamed_addr constant i8 -56, align 1 -@constants.CC = protected unnamed_addr constant i32 -1, align 4 -@constants.FOO = protected unnamed_addr constant i32 -1, align 4 +@constants_AA = protected unnamed_addr constant i8 1, align 1 +@constants_BB = local_unnamed_addr constant i8 -56, align 1 +@constants_CC = protected unnamed_addr constant i32 -1, align 4 +@constants_FOO = protected unnamed_addr constant i32 -1, align 4 !llvm.dbg.cu = !{!0} !0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "c3c", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug !1 = !DIFile(filename: "constants.c3", !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "AA", linkageName: "constants.AA", scope: !1, file: !1, line: 1 +distinct !DIGlobalVariable(name: "AA", linkageName: "constants_AA", scope: !1, file: !1, line: 1 !DIBasicType(name: "char", size: 8, encoding: DW_ATE_unsigned_char) !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "BB", linkageName: "constants.BB", scope: !1, file: !1, line: 2 +distinct !DIGlobalVariable(name: "BB", linkageName: "constants_BB", scope: !1, file: !1, line: 2 !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "CC", linkageName: "constants.CC", scope: !1, file: !1, line: 3 +distinct !DIGlobalVariable(name: "CC", linkageName: "constants_CC", scope: !1, file: !1, line: 3 !DIBasicType(name: "uint", size: 32, encoding: DW_ATE_unsigned) !DIGlobalVariableExpression -distinct !DIGlobalVariable(name: "FOO", linkageName: "constants.FOO", scope: !1, file: !1, line: 4 +distinct !DIGlobalVariable(name: "FOO", linkageName: "constants_FOO", scope: !1, file: !1, line: 4 diff --git a/test/test_suite2/defer/defer_and_expr_block.c3t b/test/test_suite2/defer/defer_and_expr_block.c3t index af90a083e..5c8c9269b 100644 --- a/test/test_suite2/defer/defer_and_expr_block.c3t +++ b/test/test_suite2/defer/defer_and_expr_block.c3t @@ -20,7 +20,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %blockret = alloca i32, align 4 br label %if.then diff --git a/test/test_suite2/defer/defer_static_var.c3t b/test/test_suite2/defer/defer_static_var.c3t index 05123fbb1..7712cfb52 100644 --- a/test/test_suite2/defer/defer_static_var.c3t +++ b/test/test_suite2/defer/defer_static_var.c3t @@ -42,35 +42,34 @@ fn void main() /* #expect: foo.ll -@foo.y = internal unnamed_addr global i32 0, align 4 -@main.y = internal unnamed_addr global i32 0, align 4 -@main.y.7 = internal unnamed_addr global i32 0, align 4 -@main.y.12 = internal unnamed_addr global i32 0, align 4 +@"foo$y" = internal unnamed_addr global i32 0, align 4 +@"main$y" = internal unnamed_addr global i32 0, align 4 +@"main$y.7" = internal unnamed_addr global i32 0, align 4 +@"main$y.12" = internal unnamed_addr global i32 0, align 4 - -define i32 @foo.foo(i32 %0) #0 { +define i32 @foo_foo(i32 %0) #0 { entry: %gt = icmp sgt i32 %0, 0 br i1 %gt, label %if.then, label %if.exit if.then: ; preds = %entry - %1 = load i32, ptr @foo.y, align 4 + %1 = load i32, ptr @"foo$y", align 4 %add = add i32 %1, 1 - store i32 %add, ptr @foo.y, align 4 - %2 = load i32, ptr @foo.y, align 4 + store i32 %add, ptr @"foo$y", align 4 + %2 = load i32, ptr @"foo$y", align 4 call void (ptr, ...) @printf(ptr @.str, i32 %2) ret i32 2 if.exit: ; preds = %entry - %3 = load i32, ptr @foo.y, align 4 + %3 = load i32, ptr @"foo$y", align 4 %add1 = add i32 %3, 1 - store i32 %add1, ptr @foo.y, align 4 - %4 = load i32, ptr @foo.y, align 4 + store i32 %add1, ptr @"foo$y", align 4 + %4 = load i32, ptr @"foo$y", align 4 call void (ptr, ...) @printf(ptr @.str.1, i32 %4) ret i32 %0 } -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %i = alloca i32, align 4 @@ -78,9 +77,9 @@ entry: %i4 = alloca i32, align 4 %x15 = alloca i32, align 4 %i16 = alloca i32, align 4 - %0 = call i32 @foo.foo(i32 1) - %1 = call i32 @foo.foo(i32 2) - %2 = call i32 @foo.foo(i32 -2) + %0 = call i32 @foo_foo(i32 1) + %1 = call i32 @foo_foo(i32 2) + %2 = call i32 @foo_foo(i32 -2) store i32 0, ptr %x, align 4 %3 = load i32, ptr %x, align 4 call void (ptr, ...) @printf(ptr @.str.2, i32 %3) @@ -99,21 +98,21 @@ loop.body: ; preds = %loop.cond br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %loop.body - %7 = load i32, ptr @main.y, align 4 + %7 = load i32, ptr @"main$y", align 4 %add = add i32 %7, 1 - store i32 %add, ptr @main.y, align 4 + store i32 %add, ptr @"main$y", align 4 %8 = load i32, ptr %i, align 4 - %9 = load i32, ptr @main.y, align 4 + %9 = load i32, ptr @"main$y", align 4 call void (ptr, ...) @printf(ptr @.str.3, i32 %8, i32 %9) br label %loop.exit if.exit: ; preds = %loop.body call void (ptr, ...) @printf(ptr @.str.4) - %10 = load i32, ptr @main.y, align 4 + %10 = load i32, ptr @"main$y", align 4 %add1 = add i32 %10, 1 - store i32 %add1, ptr @main.y, align 4 + store i32 %add1, ptr @"main$y", align 4 %11 = load i32, ptr %i, align 4 - %12 = load i32, ptr @main.y, align 4 + %12 = load i32, ptr @"main$y", align 4 call void (ptr, ...) @printf(ptr @.str.5, i32 %11, i32 %12) %13 = load i32, ptr %i, align 4 %add2 = add i32 %13, 1 @@ -139,21 +138,21 @@ loop.body7: ; preds = %loop.cond5 br i1 %eq8, label %if.then9, label %if.exit11 if.then9: ; preds = %loop.body7 - %18 = load i32, ptr @main.y.7, align 4 + %18 = load i32, ptr @"main$y.7", align 4 %add10 = add i32 %18, 1 - store i32 %add10, ptr @main.y.7, align 4 + store i32 %add10, ptr @"main$y.7", align 4 %19 = load i32, ptr %i4, align 4 - %20 = load i32, ptr @main.y.7, align 4 + %20 = load i32, ptr @"main$y.7", align 4 call void (ptr, ...) @printf(ptr @.str.8, i32 %19, i32 %20) br label %loop.exit14 if.exit11: ; preds = %loop.body7 call void (ptr, ...) @printf(ptr @.str.9) - %21 = load i32, ptr @main.y.7, align 4 + %21 = load i32, ptr @"main$y.7", align 4 %add12 = add i32 %21, 1 - store i32 %add12, ptr @main.y.7, align 4 + store i32 %add12, ptr @"main$y.7", align 4 %22 = load i32, ptr %i4, align 4 - %23 = load i32, ptr @main.y.7, align 4 + %23 = load i32, ptr @"main$y.7", align 4 call void (ptr, ...) @printf(ptr @.str.10, i32 %22, i32 %23) %24 = load i32, ptr %i4, align 4 %add13 = add i32 %24, 1 @@ -179,21 +178,21 @@ loop.body19: ; preds = %loop.cond17 br i1 %eq20, label %if.then21, label %if.exit23 if.then21: ; preds = %loop.body19 - %29 = load i32, ptr @main.y.12, align 4 + %29 = load i32, ptr @"main$y.12", align 4 %add22 = add i32 %29, 1 - store i32 %add22, ptr @main.y.12, align 4 + store i32 %add22, ptr @"main$y.12", align 4 %30 = load i32, ptr %i16, align 4 - %31 = load i32, ptr @main.y.12, align 4 + %31 = load i32, ptr @"main$y.12", align 4 call void (ptr, ...) @printf(ptr @.str.13, i32 %30, i32 %31) br label %loop.exit26 if.exit23: ; preds = %loop.body19 call void (ptr, ...) @printf(ptr @.str.14) - %32 = load i32, ptr @main.y.12, align 4 + %32 = load i32, ptr @"main$y.12", align 4 %add24 = add i32 %32, 1 - store i32 %add24, ptr @main.y.12, align 4 + store i32 %add24, ptr @"main$y.12", align 4 %33 = load i32, ptr %i16, align 4 - %34 = load i32, ptr @main.y.12, align 4 + %34 = load i32, ptr @"main$y.12", align 4 call void (ptr, ...) @printf(ptr @.str.15, i32 %33, i32 %34) %35 = load i32, ptr %i16, align 4 %add25 = add i32 %35, 1 diff --git a/test/test_suite2/enumerations/compile_time.c3t b/test/test_suite2/enumerations/compile_time.c3t index e014657f8..1e7e7c21f 100644 --- a/test/test_suite2/enumerations/compile_time.c3t +++ b/test/test_suite2/enumerations/compile_time.c3t @@ -11,6 +11,6 @@ int myenum_sizeof = MyEnum.sizeof; // #expect: compile_time.ll -@compile_time.myenum_elements = local_unnamed_addr global i32 3, align 4 -@compile_time.myenum_alignof = local_unnamed_addr global i32 2, align 4 -@compile_time.myenum_sizeof = local_unnamed_addr global i32 2, align 4 \ No newline at end of file +@compile_time_myenum_elements = local_unnamed_addr global i32 3, align 4 +@compile_time_myenum_alignof = local_unnamed_addr global i32 2, align 4 +@compile_time_myenum_sizeof = local_unnamed_addr global i32 2, align 4 \ No newline at end of file diff --git a/test/test_suite2/enumerations/enum_associated_value.c3t b/test/test_suite2/enumerations/enum_associated_value.c3t index 86fc26a1e..1e90d6c20 100644 --- a/test/test_suite2/enumerations/enum_associated_value.c3t +++ b/test/test_suite2/enumerations/enum_associated_value.c3t @@ -18,15 +18,16 @@ fn void main() /* #expect: test.ll -@.typeid.test.Foo = linkonce constant { i8, i64, i64 } { i8 8, i64 2, i64 2 }, align 8 -@test.Foo.val = linkonce constant [2 x i32] [i32 123, i32 333], align 4 +@"ct$uint" = linkonce constant %.introspect { i8 3, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 8, i64 4, i64 ptrtoint (ptr @"ct$uint" to i64), i64 2, [0 x i64] zeroinitializer }, align 8 +@"test_Foo$val" = linkonce constant [2 x i32] [i32 123, i32 333], align 4 @.str = private unnamed_addr constant [9 x i8] c"Number A\00", align 1 @.str.1 = private unnamed_addr constant [9 x i8] c"Number B\00", align 1 -@test.Foo.testme = linkonce constant [2 x ptr] [ptr @.str, ptr @.str.1], align 8 +@"test_Foo$testme" = linkonce constant [2 x ptr] [ptr @.str, ptr @.str.1], align 8 @.str.2 = private unnamed_addr constant [17 x i8] c"%d (%s) %d (%s)\0A\00", align 1 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %x = alloca i32, align 4 %f = alloca i32, align 4 @@ -35,16 +36,16 @@ entry: store i32 1, ptr %f, align 4 store i32 0, ptr %g, align 4 %0 = load i32, ptr %f, align 4 - %1 = getelementptr inbounds [2 x i32], ptr @test.Foo.val, i32 0, i32 %0 + %1 = getelementptr inbounds [2 x i32], ptr @"test_Foo$val", i32 0, i32 %0 %2 = load i32, ptr %1, align 4 %3 = load i32, ptr %f, align 4 - %4 = getelementptr inbounds [2 x ptr], ptr @test.Foo.testme, i32 0, i32 %3 + %4 = getelementptr inbounds [2 x ptr], ptr @"test_Foo$testme", i32 0, i32 %3 %5 = load ptr, ptr %4, align 8 %6 = load i32, ptr %g, align 4 - %7 = getelementptr inbounds [2 x i32], ptr @test.Foo.val, i32 0, i32 %6 + %7 = getelementptr inbounds [2 x i32], ptr @"test_Foo$val", i32 0, i32 %6 %8 = load i32, ptr %7, align 4 %9 = load i32, ptr %g, align 4 - %10 = getelementptr inbounds [2 x ptr], ptr @test.Foo.testme, i32 0, i32 %9 + %10 = getelementptr inbounds [2 x ptr], ptr @"test_Foo$testme", i32 0, i32 %9 %11 = load ptr, ptr %10, align 8 %12 = call i32 (ptr, ...) @printf(ptr @.str.2, i32 %2, ptr %5, i32 %8, ptr %11) ret void diff --git a/test/test_suite2/enumerations/enum_cast.c3t b/test/test_suite2/enumerations/enum_cast.c3t index 6955117e3..61cec3843 100644 --- a/test/test_suite2/enumerations/enum_cast.c3t +++ b/test/test_suite2/enumerations/enum_cast.c3t @@ -35,7 +35,7 @@ fn void test() /* #expect: test.ll -define void @test.test2() #0 { +define void @test_test2() #0 { entry: %ww = alloca i8, align 1 %x = alloca i8, align 1 @@ -47,7 +47,7 @@ entry: ret void } -define void @test.test() #0 { +define void @test_test() #0 { entry: %b = alloca i8, align 1 %z = alloca i32, align 4 diff --git a/test/test_suite2/enumerations/enum_values.c3t b/test/test_suite2/enumerations/enum_values.c3t index da5b1aa8b..7e69c75da 100644 --- a/test/test_suite2/enumerations/enum_values.c3t +++ b/test/test_suite2/enumerations/enum_values.c3t @@ -20,11 +20,11 @@ fn void test(int x) %"Foo[]" = type { ptr, i64 } -@test.zfok = local_unnamed_addr global i32 0, align 4 +@test_zfok = local_unnamed_addr global i32 0, align 4 @.taddr = private global [2 x i32] [i32 0, i32 1], align 4 -@test.zw = local_unnamed_addr global %"Foo[]" { ptr @.taddr, i64 2 }, align 8 +@test_zw = local_unnamed_addr global %"Foo[]" { ptr @.taddr, i64 2 }, align 8 -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %zonk = alloca i32, align 4 %literal = alloca [2 x i32], align 4 diff --git a/test/test_suite2/enumerations/simple_inference.c3t b/test/test_suite2/enumerations/simple_inference.c3t index 018c82eda..d2e93de8c 100644 --- a/test/test_suite2/enumerations/simple_inference.c3t +++ b/test/test_suite2/enumerations/simple_inference.c3t @@ -14,7 +14,7 @@ fn void test() /* #expect: simple_inference.ll -define void @simple_inference.test() #0 { +define void @simple_inference_test() #0 { entry: %h = alloca i32, align 4 store i32 1, ptr %h, align 4 diff --git a/test/test_suite2/errors/anyerr_void.c3t b/test/test_suite2/errors/anyerr_void.c3t index dcf31daad..3856d81ec 100644 --- a/test/test_suite2/errors/anyerr_void.c3t +++ b/test/test_suite2/errors/anyerr_void.c3t @@ -27,13 +27,13 @@ fn void main() /* #expect: anyerr_void.ll ; Function Attrs: nounwind -define i64 @anyerr_void.errorThing() #0 { +define i64 @anyerr_void_errorThing() #0 { entry: - ret i64 ptrtoint (ptr @anyerr_void.MyError.BAR to i64) + ret i64 ptrtoint (ptr @"anyerr_void_MyError$BAR" to i64) } ; Function Attrs: nounwind -define i64 @anyerr_void.errorThing2() #0 { +define i64 @anyerr_void_errorThing2() #0 { entry: %reterr = alloca i64, align 8 ret i64 0 @@ -43,13 +43,13 @@ entry: declare void @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @anyerr_void.main() #0 { +define void @anyerr_void_main() #0 { entry: %z = alloca i64, align 8 %error_var = alloca i64, align 8 %error_var1 = alloca i64, align 8 store i64 0, ptr %error_var, align 8 - %0 = call i64 @anyerr_void.errorThing() + %0 = call i64 @anyerr_void_errorThing() %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %error @@ -65,10 +65,10 @@ noerr_block: ; preds = %after.errcheck, %er store i64 %1, ptr %z, align 8 %2 = load i64, ptr %z, align 8 call void (ptr, ...) @printf(ptr @.str, i64 %2) - call void (ptr, ...) @printf(ptr @.str.1, i64 ptrtoint (ptr @anyerr_void.MyError.BAR to i64)) - call void (ptr, ...) @printf(ptr @.str.2, i64 ptrtoint (ptr @anyerr_void.MyError.FOO to i64)) + call void (ptr, ...) @printf(ptr @.str.1, i64 ptrtoint (ptr @"anyerr_void_MyError$BAR" to i64)) + call void (ptr, ...) @printf(ptr @.str.2, i64 ptrtoint (ptr @"anyerr_void_MyError$FOO" to i64)) store i64 0, ptr %error_var1, align 8 - %3 = call i64 @anyerr_void.errorThing2() + %3 = call i64 @anyerr_void_errorThing2() %not_err2 = icmp eq i64 %3, 0 br i1 %not_err2, label %after.errcheck4, label %error3 diff --git a/test/test_suite2/errors/else_checks.c3t b/test/test_suite2/errors/else_checks.c3t index 9dfcb8bb5..7d7458870 100644 --- a/test/test_suite2/errors/else_checks.c3t +++ b/test/test_suite2/errors/else_checks.c3t @@ -17,7 +17,7 @@ fn void test() declare i64 @testError(ptr) #0 ; Function Attrs: nounwind -define void @else_checks.test() #0 { +define void @else_checks_test() #0 { entry: %x = alloca double, align 8 %retparam = alloca i32, align 4 diff --git a/test/test_suite2/errors/error_regression_2.c3t b/test/test_suite2/errors/error_regression_2.c3t index c237df358..74e4b44fb 100644 --- a/test/test_suite2/errors/error_regression_2.c3t +++ b/test/test_suite2/errors/error_regression_2.c3t @@ -151,754 +151,754 @@ fn void main() /* #expect: test.ll ; Function Attrs: nounwind -define void @test.Summary__print(ptr %0, ptr %1) #0 { +define void @test_Summary_print(ptr %0, ptr %1) #0 { entry: - %title = alloca %"char[]", align 8 - %2 = getelementptr inbounds %Summary, ptr %0, i32 0, i32 0 - %3 = load ptr, ptr %2, align 8 - %ptrbool = icmp ne ptr %3, null - br i1 %ptrbool, label %cond.lhs, label %cond.rhs + %title = alloca %"char[]", align 8 + %2 = getelementptr inbounds %Summary, ptr %0, i32 0, i32 0 + %3 = load ptr, ptr %2, align 8 + %ptrbool = icmp ne ptr %3, null + br i1 %ptrbool, label %cond.lhs, label %cond.rhs cond.lhs: ; preds = %entry - %4 = getelementptr inbounds %Summary, ptr %0, i32 0, i32 0 - %5 = load ptr, ptr %4, align 8 - %6 = load %"char[]", ptr %5, align 8 - br label %cond.phi + %4 = getelementptr inbounds %Summary, ptr %0, i32 0, i32 0 + %5 = load ptr, ptr %4, align 8 + %6 = load %"char[]", ptr %5, align 8 + br label %cond.phi cond.rhs: ; preds = %entry - br label %cond.phi + br label %cond.phi cond.phi: ; preds = %cond.rhs, %cond.lhs - %val = phi %"char[]" [ %6, %cond.lhs ], [ { ptr @.str.26, i64 7 }, %cond.rhs ] - store %"char[]" %val, ptr %title, align 8 - %7 = getelementptr inbounds %"char[]", ptr %title, i32 0, i32 1 - %8 = load i64, ptr %7, align 8 - %uisitrunc = trunc i64 %8 to i32 - %9 = getelementptr inbounds %"char[]", ptr %title, i32 0, i32 0 - %10 = load ptr, ptr %9, align 8 - %11 = getelementptr inbounds %Summary, ptr %0, i32 0, i32 1 - %12 = load i8, ptr %11, align 8 - %13 = trunc i8 %12 to i1 - %ternary = select i1 %13, ptr @.str.28, ptr @.str.29 - %14 = call i32 (ptr, ptr, ...) @fprintf(ptr %1, ptr @.str.27, i32 %uisitrunc, ptr %10, ptr %ternary) - ret void + %val = phi %"char[]" [ %6, %cond.lhs ], [ { ptr @.str.26, i64 7 }, %cond.rhs ] + store %"char[]" %val, ptr %title, align 8 + %7 = getelementptr inbounds %"char[]", ptr %title, i32 0, i32 1 + %8 = load i64, ptr %7, align 8 + %uisitrunc = trunc i64 %8 to i32 + %9 = getelementptr inbounds %"char[]", ptr %title, i32 0, i32 0 + %10 = load ptr, ptr %9, align 8 + %11 = getelementptr inbounds %Summary, ptr %0, i32 0, i32 1 + %12 = load i8, ptr %11, align 8 + %13 = trunc i8 %12 to i1 + %ternary = select i1 %13, ptr @.str.28, ptr @.str.29 + %14 = call i32 (ptr, ptr, ...) @fprintf(ptr %1, ptr @.str.27, i32 %uisitrunc, ptr %10, ptr %ternary) + ret void } ; Function Attrs: nounwind -define zeroext i8 @test.contains(ptr %0, i64 %1, ptr %2, i64 %3) #0 { +define zeroext i8 @test_contains(ptr %0, i64 %1, ptr %2, i64 %3) #0 { entry: - %haystack = alloca %"char[]", align 8 - %needle = alloca %"char[]", align 8 - %len = alloca i64, align 8 - %needle_len = alloca i64, align 8 - %i = alloca i64, align 8 - %4 = getelementptr inbounds { ptr, i64 }, ptr %haystack, i32 0, i32 0 - store ptr %0, ptr %4, align 8 - %5 = getelementptr inbounds { ptr, i64 }, ptr %haystack, i32 0, i32 1 - store i64 %1, ptr %5, align 8 - %6 = getelementptr inbounds { ptr, i64 }, ptr %needle, i32 0, i32 0 - store ptr %2, ptr %6, align 8 - %7 = getelementptr inbounds { ptr, i64 }, ptr %needle, i32 0, i32 1 - store i64 %3, ptr %7, align 8 - %8 = getelementptr inbounds %"char[]", ptr %haystack, i32 0, i32 1 - %9 = load i64, ptr %8, align 8 - store i64 %9, ptr %len, align 8 - %10 = getelementptr inbounds %"char[]", ptr %needle, i32 0, i32 1 - %11 = load i64, ptr %10, align 8 - store i64 %11, ptr %needle_len, align 8 - %12 = load i64, ptr %len, align 8 - %13 = load i64, ptr %needle_len, align 8 - %lt = icmp ult i64 %12, %13 - br i1 %lt, label %if.then, label %if.exit + %haystack = alloca %"char[]", align 8 + %needle = alloca %"char[]", align 8 + %len = alloca i64, align 8 + %needle_len = alloca i64, align 8 + %i = alloca i64, align 8 + %4 = getelementptr inbounds { ptr, i64 }, ptr %haystack, i32 0, i32 0 + store ptr %0, ptr %4, align 8 + %5 = getelementptr inbounds { ptr, i64 }, ptr %haystack, i32 0, i32 1 + store i64 %1, ptr %5, align 8 + %6 = getelementptr inbounds { ptr, i64 }, ptr %needle, i32 0, i32 0 + store ptr %2, ptr %6, align 8 + %7 = getelementptr inbounds { ptr, i64 }, ptr %needle, i32 0, i32 1 + store i64 %3, ptr %7, align 8 + %8 = getelementptr inbounds %"char[]", ptr %haystack, i32 0, i32 1 + %9 = load i64, ptr %8, align 8 + store i64 %9, ptr %len, align 8 + %10 = getelementptr inbounds %"char[]", ptr %needle, i32 0, i32 1 + %11 = load i64, ptr %10, align 8 + store i64 %11, ptr %needle_len, align 8 + %12 = load i64, ptr %len, align 8 + %13 = load i64, ptr %needle_len, align 8 + %lt = icmp ult i64 %12, %13 + br i1 %lt, label %if.then, label %if.exit if.then: ; preds = %entry - ret i8 0 + ret i8 0 if.exit: ; preds = %entry - %14 = load i64, ptr %needle_len, align 8 - %not = icmp eq i64 %14, 0 - br i1 %not, label %if.then1, label %if.exit2 + %14 = load i64, ptr %needle_len, align 8 + %not = icmp eq i64 %14, 0 + br i1 %not, label %if.then1, label %if.exit2 if.then1: ; preds = %if.exit - ret i8 1 + ret i8 1 if.exit2: ; preds = %if.exit - %15 = load i64, ptr %len, align 8 - %16 = load i64, ptr %needle_len, align 8 - %sub = sub i64 %16, 1 - %sub3 = sub i64 %15, %sub - store i64 %sub3, ptr %len, align 8 - store i64 0, ptr %i, align 8 - br label %loop.cond + %15 = load i64, ptr %len, align 8 + %16 = load i64, ptr %needle_len, align 8 + %sub = sub i64 %16, 1 + %sub3 = sub i64 %15, %sub + store i64 %sub3, ptr %len, align 8 + store i64 0, ptr %i, align 8 + br label %loop.cond loop.cond: ; preds = %if.exit6, %if.exit2 - %17 = load i64, ptr %i, align 8 - %18 = load i64, ptr %len, align 8 - %lt4 = icmp ult i64 %17, %18 - br i1 %lt4, label %loop.body, label %loop.exit + %17 = load i64, ptr %i, align 8 + %18 = load i64, ptr %len, align 8 + %lt4 = icmp ult i64 %17, %18 + br i1 %lt4, label %loop.body, label %loop.exit loop.body: ; preds = %loop.cond - %19 = getelementptr inbounds %"char[]", ptr %haystack, i32 0, i32 0 - %20 = load ptr, ptr %19, align 8 - %21 = load i64, ptr %i, align 8 - %ptroffset = getelementptr inbounds i8, ptr %20, i64 %21 - %22 = getelementptr inbounds %"char[]", ptr %needle, i32 0, i32 0 - %23 = load ptr, ptr %22, align 8 - %24 = load i64, ptr %needle_len, align 8 - %25 = call i32 @memcmp(ptr %ptroffset, ptr %23, i64 %24) - %eq = icmp eq i32 %25, 0 - br i1 %eq, label %if.then5, label %if.exit6 + %19 = getelementptr inbounds %"char[]", ptr %haystack, i32 0, i32 0 + %20 = load ptr, ptr %19, align 8 + %21 = load i64, ptr %i, align 8 + %ptroffset = getelementptr inbounds i8, ptr %20, i64 %21 + %22 = getelementptr inbounds %"char[]", ptr %needle, i32 0, i32 0 + %23 = load ptr, ptr %22, align 8 + %24 = load i64, ptr %needle_len, align 8 + %25 = call i32 @memcmp(ptr %ptroffset, ptr %23, i64 %24) + %eq = icmp eq i32 %25, 0 + br i1 %eq, label %if.then5, label %if.exit6 if.then5: ; preds = %loop.body - ret i8 1 + ret i8 1 if.exit6: ; preds = %loop.body - %26 = load i64, ptr %i, align 8 - %add = add i64 %26, 1 - store i64 %add, ptr %i, align 8 - br label %loop.cond + %26 = load i64, ptr %i, align 8 + %add = add i64 %26, 1 + store i64 %add, ptr %i, align 8 + br label %loop.cond loop.exit: ; preds = %loop.cond - ret i8 0 + ret i8 0 } ; Function Attrs: nounwind -define i64 @test.readDoc(ptr %0, ptr %1, i64 %2) #0 { +define i64 @test_readDoc(ptr %0, ptr %1, i64 %2) #0 { entry: - %url = alloca %"char[]", align 8 - %taddr = alloca %"char[]", align 8 - %taddr5 = alloca %"char[]", align 8 - %reterr = alloca i64, align 8 - %literal = alloca %Doc, align 8 - %taddr12 = alloca %"char[]", align 8 - %reterr16 = alloca i64, align 8 - %literal17 = alloca %Doc, align 8 - %error_var = alloca i64, align 8 - %value = alloca %Head, align 8 - %literal18 = alloca %Head, align 8 - %temp = alloca ptr, align 8 - %taddr24 = alloca %"char[]", align 8 - %reterr28 = alloca i64, align 8 - %literal29 = alloca %Doc, align 8 - %error_var30 = alloca i64, align 8 - %value31 = alloca %Head, align 8 - %literal32 = alloca %Head, align 8 - %error_var33 = alloca i64, align 8 - %value34 = alloca %"char[]", align 8 - %temp35 = alloca ptr, align 8 - %temp41 = alloca ptr, align 8 - %len = alloca i32, align 4 - %str = alloca ptr, align 8 - %reterr54 = alloca i64, align 8 - %literal55 = alloca %Doc, align 8 - %error_var56 = alloca i64, align 8 - %value57 = alloca %Head, align 8 - %literal58 = alloca %Head, align 8 - %error_var59 = alloca i64, align 8 - %value60 = alloca %"char[]", align 8 - %temp61 = alloca ptr, align 8 - %temp67 = alloca ptr, align 8 - %3 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - store ptr %1, ptr %3, align 8 - %4 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - store i64 %2, ptr %4, align 8 - %5 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo = load ptr, ptr %5, align 8 - %6 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi = load i64, ptr %6, align 8 - store %"char[]" { ptr @.str, i64 4 }, ptr %taddr, align 8 - %7 = getelementptr inbounds { ptr, i64 }, ptr %taddr, i32 0, i32 0 - %lo1 = load ptr, ptr %7, align 8 - %8 = getelementptr inbounds { ptr, i64 }, ptr %taddr, i32 0, i32 1 - %hi2 = load i64, ptr %8, align 8 - %9 = call i8 @test.contains(ptr %lo, i64 %hi, ptr %lo1, i64 %hi2) - %10 = trunc i8 %9 to i1 - br i1 %10, label %if.then, label %if.exit + %url = alloca %"char[]", align 8 + %taddr = alloca %"char[]", align 8 + %taddr5 = alloca %"char[]", align 8 + %reterr = alloca i64, align 8 + %literal = alloca %Doc, align 8 + %taddr12 = alloca %"char[]", align 8 + %reterr16 = alloca i64, align 8 + %literal17 = alloca %Doc, align 8 + %error_var = alloca i64, align 8 + %value = alloca %Head, align 8 + %literal18 = alloca %Head, align 8 + %temp = alloca ptr, align 8 + %taddr24 = alloca %"char[]", align 8 + %reterr28 = alloca i64, align 8 + %literal29 = alloca %Doc, align 8 + %error_var30 = alloca i64, align 8 + %value31 = alloca %Head, align 8 + %literal32 = alloca %Head, align 8 + %error_var33 = alloca i64, align 8 + %value34 = alloca %"char[]", align 8 + %temp35 = alloca ptr, align 8 + %temp41 = alloca ptr, align 8 + %len = alloca i32, align 4 + %str = alloca ptr, align 8 + %reterr54 = alloca i64, align 8 + %literal55 = alloca %Doc, align 8 + %error_var56 = alloca i64, align 8 + %value57 = alloca %Head, align 8 + %literal58 = alloca %Head, align 8 + %error_var59 = alloca i64, align 8 + %value60 = alloca %"char[]", align 8 + %temp61 = alloca ptr, align 8 + %temp67 = alloca ptr, align 8 + %3 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + store ptr %1, ptr %3, align 8 + %4 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + store i64 %2, ptr %4, align 8 + %5 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo = load ptr, ptr %5, align 8 + %6 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi = load i64, ptr %6, align 8 + store %"char[]" { ptr @.str, i64 4 }, ptr %taddr, align 8 + %7 = getelementptr inbounds { ptr, i64 }, ptr %taddr, i32 0, i32 0 + %lo1 = load ptr, ptr %7, align 8 + %8 = getelementptr inbounds { ptr, i64 }, ptr %taddr, i32 0, i32 1 + %hi2 = load i64, ptr %8, align 8 + %9 = call i8 @test_contains(ptr %lo, i64 %hi, ptr %lo1, i64 %hi2) + %10 = trunc i8 %9 to i1 + br i1 %10, label %if.then, label %if.exit if.then: ; preds = %entry - ret i64 ptrtoint (ptr @test.ReadError.BAD_READ to i64) + ret i64 ptrtoint (ptr @"test_ReadError$BAD_READ" to i64) if.exit: ; preds = %entry - %11 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo3 = load ptr, ptr %11, align 8 - %12 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi4 = load i64, ptr %12, align 8 - store %"char[]" { ptr @.str.1, i64 12 }, ptr %taddr5, align 8 - %13 = getelementptr inbounds { ptr, i64 }, ptr %taddr5, i32 0, i32 0 - %lo6 = load ptr, ptr %13, align 8 - %14 = getelementptr inbounds { ptr, i64 }, ptr %taddr5, i32 0, i32 1 - %hi7 = load i64, ptr %14, align 8 - %15 = call i8 @test.contains(ptr %lo3, i64 %hi4, ptr %lo6, i64 %hi7) - %16 = trunc i8 %15 to i1 - br i1 %16, label %if.then8, label %if.exit9 + %11 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo3 = load ptr, ptr %11, align 8 + %12 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi4 = load i64, ptr %12, align 8 + store %"char[]" { ptr @.str.1, i64 12 }, ptr %taddr5, align 8 + %13 = getelementptr inbounds { ptr, i64 }, ptr %taddr5, i32 0, i32 0 + %lo6 = load ptr, ptr %13, align 8 + %14 = getelementptr inbounds { ptr, i64 }, ptr %taddr5, i32 0, i32 1 + %hi7 = load i64, ptr %14, align 8 + %15 = call i8 @test_contains(ptr %lo3, i64 %hi4, ptr %lo6, i64 %hi7) + %16 = trunc i8 %15 to i1 + br i1 %16, label %if.then8, label %if.exit9 if.then8: ; preds = %if.exit - %17 = getelementptr inbounds %Doc, ptr %literal, i32 0, i32 0 - store ptr null, ptr %17, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal, i32 8, i1 false) - ret i64 0 + %17 = getelementptr inbounds %Doc, ptr %literal, i32 0, i32 0 + store ptr null, ptr %17, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal, i32 8, i1 false) + ret i64 0 if.exit9: ; preds = %if.exit - %18 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo10 = load ptr, ptr %18, align 8 - %19 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi11 = load i64, ptr %19, align 8 - store %"char[]" { ptr @.str.2, i64 13 }, ptr %taddr12, align 8 - %20 = getelementptr inbounds { ptr, i64 }, ptr %taddr12, i32 0, i32 0 - %lo13 = load ptr, ptr %20, align 8 - %21 = getelementptr inbounds { ptr, i64 }, ptr %taddr12, i32 0, i32 1 - %hi14 = load i64, ptr %21, align 8 - %22 = call i8 @test.contains(ptr %lo10, i64 %hi11, ptr %lo13, i64 %hi14) - %23 = trunc i8 %22 to i1 - br i1 %23, label %if.then15, label %if.exit21 + %18 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo10 = load ptr, ptr %18, align 8 + %19 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi11 = load i64, ptr %19, align 8 + store %"char[]" { ptr @.str.2, i64 13 }, ptr %taddr12, align 8 + %20 = getelementptr inbounds { ptr, i64 }, ptr %taddr12, i32 0, i32 0 + %lo13 = load ptr, ptr %20, align 8 + %21 = getelementptr inbounds { ptr, i64 }, ptr %taddr12, i32 0, i32 1 + %hi14 = load i64, ptr %21, align 8 + %22 = call i8 @test_contains(ptr %lo10, i64 %hi11, ptr %lo13, i64 %hi14) + %23 = trunc i8 %22 to i1 + br i1 %23, label %if.then15, label %if.exit21 if.then15: ; preds = %if.exit9 - %24 = getelementptr inbounds %Doc, ptr %literal17, i32 0, i32 0 - %25 = getelementptr inbounds %Head, ptr %literal18, i32 0, i32 0 - store ptr null, ptr %25, align 8 - %26 = load %Head, ptr %literal18, align 8 - store %Head %26, ptr %value, align 8 - %27 = call ptr @"std::core::mem.alloc"(i64 8, i64 0) - store ptr %27, ptr %temp, align 8 - %28 = load ptr, ptr %temp, align 8 - %not = icmp eq ptr %28, null - br i1 %not, label %if.then19, label %if.exit20 + %24 = getelementptr inbounds %Doc, ptr %literal17, i32 0, i32 0 + %25 = getelementptr inbounds %Head, ptr %literal18, i32 0, i32 0 + store ptr null, ptr %25, align 8 + %26 = load %Head, ptr %literal18, align 8 + store %Head %26, ptr %value, align 8 + %27 = call ptr @std_core_mem_alloc(i64 8, i64 0) + store ptr %27, ptr %temp, align 8 + %28 = load ptr, ptr %temp, align 8 + %not = icmp eq ptr %28, null + br i1 %not, label %if.then19, label %if.exit20 if.then19: ; preds = %if.then15 - store i64 ptrtoint (ptr @test.ReadError.OUT_OF_MEMORY to i64), ptr %error_var, align 8 - br label %guard_block + store i64 ptrtoint (ptr @"test_ReadError$OUT_OF_MEMORY" to i64), ptr %error_var, align 8 + br label %guard_block if.exit20: ; preds = %if.then15 - %29 = load ptr, ptr %temp, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %29, ptr align 8 %value, i32 8, i1 false) - br label %noerr_block + %29 = load ptr, ptr %temp, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %29, ptr align 8 %value, i32 8, i1 false) + br label %noerr_block guard_block: ; preds = %if.then19 - %30 = load i64, ptr %error_var, align 8 - ret i64 %30 + %30 = load i64, ptr %error_var, align 8 + ret i64 %30 noerr_block: ; preds = %if.exit20 - %31 = load ptr, ptr %temp, align 8 - store ptr %31, ptr %24, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal17, i32 8, i1 false) - ret i64 0 + %31 = load ptr, ptr %temp, align 8 + store ptr %31, ptr %24, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal17, i32 8, i1 false) + ret i64 0 if.exit21: ; preds = %if.exit9 - %32 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo22 = load ptr, ptr %32, align 8 - %33 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi23 = load i64, ptr %33, align 8 - store %"char[]" { ptr @.str.3, i64 11 }, ptr %taddr24, align 8 - %34 = getelementptr inbounds { ptr, i64 }, ptr %taddr24, i32 0, i32 0 - %lo25 = load ptr, ptr %34, align 8 - %35 = getelementptr inbounds { ptr, i64 }, ptr %taddr24, i32 0, i32 1 - %hi26 = load i64, ptr %35, align 8 - %36 = call i8 @test.contains(ptr %lo22, i64 %hi23, ptr %lo25, i64 %hi26) - %37 = trunc i8 %36 to i1 - br i1 %37, label %if.then27, label %if.exit47 + %32 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo22 = load ptr, ptr %32, align 8 + %33 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi23 = load i64, ptr %33, align 8 + store %"char[]" { ptr @.str.3, i64 11 }, ptr %taddr24, align 8 + %34 = getelementptr inbounds { ptr, i64 }, ptr %taddr24, i32 0, i32 0 + %lo25 = load ptr, ptr %34, align 8 + %35 = getelementptr inbounds { ptr, i64 }, ptr %taddr24, i32 0, i32 1 + %hi26 = load i64, ptr %35, align 8 + %36 = call i8 @test_contains(ptr %lo22, i64 %hi23, ptr %lo25, i64 %hi26) + %37 = trunc i8 %36 to i1 + br i1 %37, label %if.then27, label %if.exit47 if.then27: ; preds = %if.exit21 - %38 = getelementptr inbounds %Doc, ptr %literal29, i32 0, i32 0 - store ptr null, ptr %literal32, align 8 - %39 = getelementptr inbounds %Head, ptr %literal32, i32 0, i32 0 - store %"char[]" { ptr @.str.4, i64 0 }, ptr %value34, align 8 - %40 = call ptr @"std::core::mem.alloc"(i64 16, i64 0) - store ptr %40, ptr %temp35, align 8 - %41 = load ptr, ptr %temp35, align 8 - %not36 = icmp eq ptr %41, null - br i1 %not36, label %if.then37, label %if.exit38 + %38 = getelementptr inbounds %Doc, ptr %literal29, i32 0, i32 0 + store ptr null, ptr %literal32, align 8 + %39 = getelementptr inbounds %Head, ptr %literal32, i32 0, i32 0 + store %"char[]" { ptr @.str.4, i64 0 }, ptr %value34, align 8 + %40 = call ptr @std_core_mem_alloc(i64 16, i64 0) + store ptr %40, ptr %temp35, align 8 + %41 = load ptr, ptr %temp35, align 8 + %not36 = icmp eq ptr %41, null + br i1 %not36, label %if.then37, label %if.exit38 if.then37: ; preds = %if.then27 - store i64 ptrtoint (ptr @test.ReadError.OUT_OF_MEMORY to i64), ptr %error_var33, align 8 - br label %guard_block39 + store i64 ptrtoint (ptr @"test_ReadError$OUT_OF_MEMORY" to i64), ptr %error_var33, align 8 + br label %guard_block39 if.exit38: ; preds = %if.then27 - %42 = load ptr, ptr %temp35, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %42, ptr align 8 %value34, i32 16, i1 false) - br label %noerr_block40 + %42 = load ptr, ptr %temp35, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %42, ptr align 8 %value34, i32 16, i1 false) + br label %noerr_block40 guard_block39: ; preds = %if.then37 - %43 = load i64, ptr %error_var33, align 8 - ret i64 %43 + %43 = load i64, ptr %error_var33, align 8 + ret i64 %43 noerr_block40: ; preds = %if.exit38 - %44 = load ptr, ptr %temp35, align 8 - store ptr %44, ptr %39, align 8 - %45 = load %Head, ptr %literal32, align 8 - store %Head %45, ptr %value31, align 8 - %46 = call ptr @"std::core::mem.alloc"(i64 8, i64 0) - store ptr %46, ptr %temp41, align 8 - %47 = load ptr, ptr %temp41, align 8 - %not42 = icmp eq ptr %47, null - br i1 %not42, label %if.then43, label %if.exit44 + %44 = load ptr, ptr %temp35, align 8 + store ptr %44, ptr %39, align 8 + %45 = load %Head, ptr %literal32, align 8 + store %Head %45, ptr %value31, align 8 + %46 = call ptr @std_core_mem_alloc(i64 8, i64 0) + store ptr %46, ptr %temp41, align 8 + %47 = load ptr, ptr %temp41, align 8 + %not42 = icmp eq ptr %47, null + br i1 %not42, label %if.then43, label %if.exit44 if.then43: ; preds = %noerr_block40 - store i64 ptrtoint (ptr @test.ReadError.OUT_OF_MEMORY to i64), ptr %error_var30, align 8 - br label %guard_block45 + store i64 ptrtoint (ptr @"test_ReadError$OUT_OF_MEMORY" to i64), ptr %error_var30, align 8 + br label %guard_block45 if.exit44: ; preds = %noerr_block40 - %48 = load ptr, ptr %temp41, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %48, ptr align 8 %value31, i32 8, i1 false) - br label %noerr_block46 + %48 = load ptr, ptr %temp41, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %48, ptr align 8 %value31, i32 8, i1 false) + br label %noerr_block46 guard_block45: ; preds = %if.then43 - %49 = load i64, ptr %error_var30, align 8 - ret i64 %49 + %49 = load i64, ptr %error_var30, align 8 + ret i64 %49 noerr_block46: ; preds = %if.exit44 - %50 = load ptr, ptr %temp41, align 8 - store ptr %50, ptr %38, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal29, i32 8, i1 false) - ret i64 0 + %50 = load ptr, ptr %temp41, align 8 + store ptr %50, ptr %38, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal29, i32 8, i1 false) + ret i64 0 if.exit47: ; preds = %if.exit21 - %51 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 1 - %52 = load i64, ptr %51, align 8 - %uisitrunc = trunc i64 %52 to i32 - %53 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 0 - %54 = load ptr, ptr %53, align 8 - %55 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr null, i64 0, ptr @.str.5, i32 %uisitrunc, ptr %54) - store i32 %55, ptr %len, align 4 - %56 = load i32, ptr %len, align 4 - %siuiext = sext i32 %56 to i64 - %add = add i64 %siuiext, 1 - %57 = call ptr @"std::core::mem.alloc"(i64 %add, i64 0) - store ptr %57, ptr %str, align 8 - %58 = load ptr, ptr %str, align 8 - %not48 = icmp eq ptr %58, null - br i1 %not48, label %if.then49, label %if.exit50 + %51 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 1 + %52 = load i64, ptr %51, align 8 + %uisitrunc = trunc i64 %52 to i32 + %53 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 0 + %54 = load ptr, ptr %53, align 8 + %55 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr null, i64 0, ptr @.str.5, i32 %uisitrunc, ptr %54) + store i32 %55, ptr %len, align 4 + %56 = load i32, ptr %len, align 4 + %siuiext = sext i32 %56 to i64 + %add = add i64 %siuiext, 1 + %57 = call ptr @std_core_mem_alloc(i64 %add, i64 0) + store ptr %57, ptr %str, align 8 + %58 = load ptr, ptr %str, align 8 + %not48 = icmp eq ptr %58, null + br i1 %not48, label %if.then49, label %if.exit50 if.then49: ; preds = %if.exit47 - ret i64 ptrtoint (ptr @test.ReadError.OUT_OF_MEMORY to i64) + ret i64 ptrtoint (ptr @"test_ReadError$OUT_OF_MEMORY" to i64) if.exit50: ; preds = %if.exit47 - %59 = load ptr, ptr %str, align 8 - %60 = load i32, ptr %len, align 4 - %siuiext51 = sext i32 %60 to i64 - %add52 = add i64 %siuiext51, 1 - %61 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 1 - %62 = load i64, ptr %61, align 8 - %uisitrunc53 = trunc i64 %62 to i32 - %63 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 0 - %64 = load ptr, ptr %63, align 8 - %65 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr %59, i64 %add52, ptr @.str.6, i32 %uisitrunc53, ptr %64) - %66 = getelementptr inbounds %Doc, ptr %literal55, i32 0, i32 0 - store ptr null, ptr %literal58, align 8 - %67 = getelementptr inbounds %Head, ptr %literal58, i32 0, i32 0 - %68 = load ptr, ptr %str, align 8 - %69 = load i32, ptr %len, align 4 - %sub = sub i32 %69, 1 - %sisiext = sext i32 %sub to i64 - %70 = add i64 %sisiext, 1 - %size = sub i64 %70, 0 - %ptroffset = getelementptr inbounds i8, ptr %68, i64 0 - %71 = insertvalue %"char[]" undef, ptr %ptroffset, 0 - %72 = insertvalue %"char[]" %71, i64 %size, 1 - store %"char[]" %72, ptr %value60, align 8 - %73 = call ptr @"std::core::mem.alloc"(i64 16, i64 0) - store ptr %73, ptr %temp61, align 8 - %74 = load ptr, ptr %temp61, align 8 - %not62 = icmp eq ptr %74, null - br i1 %not62, label %if.then63, label %if.exit64 + %59 = load ptr, ptr %str, align 8 + %60 = load i32, ptr %len, align 4 + %siuiext51 = sext i32 %60 to i64 + %add52 = add i64 %siuiext51, 1 + %61 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 1 + %62 = load i64, ptr %61, align 8 + %uisitrunc53 = trunc i64 %62 to i32 + %63 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 0 + %64 = load ptr, ptr %63, align 8 + %65 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr %59, i64 %add52, ptr @.str.6, i32 %uisitrunc53, ptr %64) + %66 = getelementptr inbounds %Doc, ptr %literal55, i32 0, i32 0 + store ptr null, ptr %literal58, align 8 + %67 = getelementptr inbounds %Head, ptr %literal58, i32 0, i32 0 + %68 = load ptr, ptr %str, align 8 + %69 = load i32, ptr %len, align 4 + %sub = sub i32 %69, 1 + %sisiext = sext i32 %sub to i64 + %70 = add i64 %sisiext, 1 + %size = sub i64 %70, 0 + %ptroffset = getelementptr inbounds i8, ptr %68, i64 0 + %71 = insertvalue %"char[]" undef, ptr %ptroffset, 0 + %72 = insertvalue %"char[]" %71, i64 %size, 1 + store %"char[]" %72, ptr %value60, align 8 + %73 = call ptr @std_core_mem_alloc(i64 16, i64 0) + store ptr %73, ptr %temp61, align 8 + %74 = load ptr, ptr %temp61, align 8 + %not62 = icmp eq ptr %74, null + br i1 %not62, label %if.then63, label %if.exit64 if.then63: ; preds = %if.exit50 - store i64 ptrtoint (ptr @test.ReadError.OUT_OF_MEMORY to i64), ptr %error_var59, align 8 - br label %guard_block65 + store i64 ptrtoint (ptr @"test_ReadError$OUT_OF_MEMORY" to i64), ptr %error_var59, align 8 + br label %guard_block65 if.exit64: ; preds = %if.exit50 - %75 = load ptr, ptr %temp61, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %75, ptr align 8 %value60, i32 16, i1 false) - br label %noerr_block66 + %75 = load ptr, ptr %temp61, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %75, ptr align 8 %value60, i32 16, i1 false) + br label %noerr_block66 guard_block65: ; preds = %if.then63 - %76 = load i64, ptr %error_var59, align 8 - ret i64 %76 + %76 = load i64, ptr %error_var59, align 8 + ret i64 %76 noerr_block66: ; preds = %if.exit64 - %77 = load ptr, ptr %temp61, align 8 - store ptr %77, ptr %67, align 8 - %78 = load %Head, ptr %literal58, align 8 - store %Head %78, ptr %value57, align 8 - %79 = call ptr @"std::core::mem.alloc"(i64 8, i64 0) - store ptr %79, ptr %temp67, align 8 - %80 = load ptr, ptr %temp67, align 8 - %not68 = icmp eq ptr %80, null - br i1 %not68, label %if.then69, label %if.exit70 + %77 = load ptr, ptr %temp61, align 8 + store ptr %77, ptr %67, align 8 + %78 = load %Head, ptr %literal58, align 8 + store %Head %78, ptr %value57, align 8 + %79 = call ptr @std_core_mem_alloc(i64 8, i64 0) + store ptr %79, ptr %temp67, align 8 + %80 = load ptr, ptr %temp67, align 8 + %not68 = icmp eq ptr %80, null + br i1 %not68, label %if.then69, label %if.exit70 if.then69: ; preds = %noerr_block66 - store i64 ptrtoint (ptr @test.ReadError.OUT_OF_MEMORY to i64), ptr %error_var56, align 8 - br label %guard_block71 + store i64 ptrtoint (ptr @"test_ReadError$OUT_OF_MEMORY" to i64), ptr %error_var56, align 8 + br label %guard_block71 if.exit70: ; preds = %noerr_block66 - %81 = load ptr, ptr %temp67, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %81, ptr align 8 %value57, i32 8, i1 false) - br label %noerr_block72 + %81 = load ptr, ptr %temp67, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %81, ptr align 8 %value57, i32 8, i1 false) + br label %noerr_block72 guard_block71: ; preds = %if.then69 - %82 = load i64, ptr %error_var56, align 8 - ret i64 %82 + %82 = load i64, ptr %error_var56, align 8 + ret i64 %82 noerr_block72: ; preds = %if.exit70 - %83 = load ptr, ptr %temp67, align 8 - store ptr %83, ptr %66, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal55, i32 8, i1 false) - ret i64 0 + %83 = load ptr, ptr %temp67, align 8 + store ptr %83, ptr %66, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %0, ptr align 8 %literal55, i32 8, i1 false) + ret i64 0 } ; Function Attrs: nounwind -define { ptr, i8 } @test.buildSummary(ptr %0) #0 { +define { ptr, i8 } @test_buildSummary(ptr %0) #0 { entry: - %doc = alloca %Doc, align 8 - %literal = alloca %Summary, align 8 - %tempcoerce = alloca { ptr, i8 }, align 8 - %1 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 - store ptr %0, ptr %1, align 8 - %2 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 0 - store ptr null, ptr %2, align 8 - %3 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 1 - store i8 0, ptr %3, align 8 - %4 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 0 - %5 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 - %6 = load ptr, ptr %5, align 8 - %ptrbool = icmp ne ptr %6, null - br i1 %ptrbool, label %cond.lhs, label %cond.rhs + %doc = alloca %Doc, align 8 + %literal = alloca %Summary, align 8 + %tempcoerce = alloca { ptr, i8 }, align 8 + %1 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 + store ptr %0, ptr %1, align 8 + %2 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 0 + store ptr null, ptr %2, align 8 + %3 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 1 + store i8 0, ptr %3, align 8 + %4 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 0 + %5 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 + %6 = load ptr, ptr %5, align 8 + %ptrbool = icmp ne ptr %6, null + br i1 %ptrbool, label %cond.lhs, label %cond.rhs cond.lhs: ; preds = %entry - %7 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 - %8 = load ptr, ptr %7, align 8 - %9 = getelementptr inbounds %Head, ptr %8, i32 0, i32 0 - %10 = load ptr, ptr %9, align 8 - br label %cond.phi + %7 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 + %8 = load ptr, ptr %7, align 8 + %9 = getelementptr inbounds %Head, ptr %8, i32 0, i32 0 + %10 = load ptr, ptr %9, align 8 + br label %cond.phi cond.rhs: ; preds = %entry - br label %cond.phi + br label %cond.phi cond.phi: ; preds = %cond.rhs, %cond.lhs - %val = phi ptr [ %10, %cond.lhs ], [ null, %cond.rhs ] - store ptr %val, ptr %4, align 8 - %11 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 1 - store i8 1, ptr %11, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %tempcoerce, ptr align 8 %literal, i32 16, i1 false) - %12 = load { ptr, i8 }, ptr %tempcoerce, align 8 - ret { ptr, i8 } %12 + %val = phi ptr [ %10, %cond.lhs ], [ null, %cond.rhs ] + store ptr %val, ptr %4, align 8 + %11 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 1 + store i8 1, ptr %11, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %tempcoerce, ptr align 8 %literal, i32 16, i1 false) + %12 = load { ptr, i8 }, ptr %tempcoerce, align 8 + ret { ptr, i8 } %12 } ; Function Attrs: nounwind -define { ptr, i8 } @test.readAndBuildSummary(ptr %0, i64 %1) #0 { +define { ptr, i8 } @test_readAndBuildSummary(ptr %0, i64 %1) #0 { entry: - %url = alloca %"char[]", align 8 - %retparam = alloca %Doc, align 8 - %result = alloca %Summary, align 8 - %literal = alloca %Summary, align 8 - %taddr = alloca %Summary, align 8 - %tempcoerce = alloca { ptr, i8 }, align 8 - %2 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - store ptr %0, ptr %2, align 8 - %3 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - store i64 %1, ptr %3, align 8 - %4 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo = load ptr, ptr %4, align 8 - %5 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi = load i64, ptr %5, align 8 - %6 = call i64 @test.readDoc(ptr %retparam, ptr %lo, i64 %hi) - %not_err = icmp eq i64 %6, 0 - br i1 %not_err, label %after.errcheck, label %else_block + %url = alloca %"char[]", align 8 + %retparam = alloca %Doc, align 8 + %result = alloca %Summary, align 8 + %literal = alloca %Summary, align 8 + %taddr = alloca %Summary, align 8 + %tempcoerce = alloca { ptr, i8 }, align 8 + %2 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + store ptr %0, ptr %2, align 8 + %3 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + store i64 %1, ptr %3, align 8 + %4 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo = load ptr, ptr %4, align 8 + %5 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi = load i64, ptr %5, align 8 + %6 = call i64 @test_readDoc(ptr %retparam, ptr %lo, i64 %hi) + %not_err = icmp eq i64 %6, 0 + br i1 %not_err, label %after.errcheck, label %else_block after.errcheck: ; preds = %entry - %7 = getelementptr inbounds %Doc, ptr %retparam, i32 0, i32 0 - %8 = load ptr, ptr %7, align 8 - %9 = call { ptr, i8 } @test.buildSummary(ptr %8) - store { ptr, i8 } %9, ptr %result, align 8 - %10 = load %Summary, ptr %result, align 8 - br label %phi_block + %7 = getelementptr inbounds %Doc, ptr %retparam, i32 0, i32 0 + %8 = load ptr, ptr %7, align 8 + %9 = call { ptr, i8 } @test_buildSummary(ptr %8) + store { ptr, i8 } %9, ptr %result, align 8 + %10 = load %Summary, ptr %result, align 8 + br label %phi_block else_block: ; preds = %entry - %11 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 0 - store ptr null, ptr %11, align 8 - %12 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 1 - store i8 0, ptr %12, align 8 - %13 = load %Summary, ptr %literal, align 8 - br label %phi_block + %11 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 0 + store ptr null, ptr %11, align 8 + %12 = getelementptr inbounds %Summary, ptr %literal, i32 0, i32 1 + store i8 0, ptr %12, align 8 + %13 = load %Summary, ptr %literal, align 8 + br label %phi_block phi_block: ; preds = %else_block, %after.errcheck - %val = phi %Summary [ %10, %after.errcheck ], [ %13, %else_block ] - store %Summary %val, ptr %taddr, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %tempcoerce, ptr align 8 %taddr, i32 16, i1 false) - %14 = load { ptr, i8 }, ptr %tempcoerce, align 8 - ret { ptr, i8 } %14 + %val = phi %Summary [ %10, %after.errcheck ], [ %13, %else_block ] + store %Summary %val, ptr %taddr, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %tempcoerce, ptr align 8 %taddr, i32 16, i1 false) + %14 = load { ptr, i8 }, ptr %tempcoerce, align 8 + ret { ptr, i8 } %14 } ; Function Attrs: nounwind -define i64 @test.isTitleNonEmpty(ptr %0, ptr %1) #0 { +define i64 @test_isTitleNonEmpty(ptr %0, ptr %1) #0 { entry: - %doc = alloca %Doc, align 8 - %head = alloca ptr, align 8 - %reterr = alloca i64, align 8 - %2 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 - store ptr %1, ptr %2, align 8 - %3 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 - %4 = load ptr, ptr %3, align 8 - %not = icmp eq ptr %4, null - br i1 %not, label %if.then, label %if.exit + %doc = alloca %Doc, align 8 + %head = alloca ptr, align 8 + %reterr = alloca i64, align 8 + %2 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 + store ptr %1, ptr %2, align 8 + %3 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 + %4 = load ptr, ptr %3, align 8 + %not = icmp eq ptr %4, null + br i1 %not, label %if.then, label %if.exit if.then: ; preds = %entry - ret i64 ptrtoint (ptr @test.TitleResult.TITLE_MISSING to i64) + ret i64 ptrtoint (ptr @"test_TitleResult$TITLE_MISSING" to i64) if.exit: ; preds = %entry - %5 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 - %6 = load ptr, ptr %5, align 8 - %7 = getelementptr inbounds %Head, ptr %6, i32 0, i32 0 - %8 = load ptr, ptr %7, align 8 - store ptr %8, ptr %head, align 8 - %9 = load ptr, ptr %head, align 8 - %not1 = icmp eq ptr %9, null - br i1 %not1, label %if.then2, label %if.exit3 + %5 = getelementptr inbounds %Doc, ptr %doc, i32 0, i32 0 + %6 = load ptr, ptr %5, align 8 + %7 = getelementptr inbounds %Head, ptr %6, i32 0, i32 0 + %8 = load ptr, ptr %7, align 8 + store ptr %8, ptr %head, align 8 + %9 = load ptr, ptr %head, align 8 + %not1 = icmp eq ptr %9, null + br i1 %not1, label %if.then2, label %if.exit3 if.then2: ; preds = %if.exit - ret i64 ptrtoint (ptr @test.TitleResult.TITLE_MISSING to i64) + ret i64 ptrtoint (ptr @"test_TitleResult$TITLE_MISSING" to i64) if.exit3: ; preds = %if.exit - %10 = load ptr, ptr %head, align 8 - %11 = getelementptr inbounds %"char[]", ptr %10, i32 0, i32 1 - %12 = load i64, ptr %11, align 8 - %lt = icmp ult i64 0, %12 - %13 = zext i1 %lt to i8 - store i8 %13, ptr %0, align 1 - ret i64 0 + %10 = load ptr, ptr %head, align 8 + %11 = getelementptr inbounds %"char[]", ptr %10, i32 0, i32 1 + %12 = load i64, ptr %11, align 8 + %lt = icmp ult i64 0, %12 + %13 = zext i1 %lt to i8 + store i8 %13, ptr %0, align 1 + ret i64 0 } ; Function Attrs: nounwind -define i64 @test.readWhetherTitleNonEmpty(ptr %0, ptr %1, i64 %2) #0 { +define i64 @test_readWhetherTitleNonEmpty(ptr %0, ptr %1, i64 %2) #0 { entry: - %url = alloca %"char[]", align 8 - %reterr = alloca i64, align 8 - %retparam = alloca i8, align 1 - %retparam1 = alloca %Doc, align 8 - %3 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - store ptr %1, ptr %3, align 8 - %4 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - store i64 %2, ptr %4, align 8 - %5 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo = load ptr, ptr %5, align 8 - %6 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi = load i64, ptr %6, align 8 - %7 = call i64 @test.readDoc(ptr %retparam1, ptr %lo, i64 %hi) - %not_err = icmp eq i64 %7, 0 - br i1 %not_err, label %after.errcheck, label %error + %url = alloca %"char[]", align 8 + %reterr = alloca i64, align 8 + %retparam = alloca i8, align 1 + %retparam1 = alloca %Doc, align 8 + %3 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + store ptr %1, ptr %3, align 8 + %4 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + store i64 %2, ptr %4, align 8 + %5 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo = load ptr, ptr %5, align 8 + %6 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi = load i64, ptr %6, align 8 + %7 = call i64 @test_readDoc(ptr %retparam1, ptr %lo, i64 %hi) + %not_err = icmp eq i64 %7, 0 + br i1 %not_err, label %after.errcheck, label %error error: ; preds = %entry - store i64 %7, ptr %reterr, align 8 - br label %err_retblock + store i64 %7, ptr %reterr, align 8 + br label %err_retblock after.errcheck: ; preds = %entry - %8 = getelementptr inbounds %Doc, ptr %retparam1, i32 0, i32 0 - %9 = load ptr, ptr %8, align 8 - %10 = call i64 @test.isTitleNonEmpty(ptr %retparam, ptr %9) - %not_err2 = icmp eq i64 %10, 0 - br i1 %not_err2, label %after.errcheck4, label %error3 + %8 = getelementptr inbounds %Doc, ptr %retparam1, i32 0, i32 0 + %9 = load ptr, ptr %8, align 8 + %10 = call i64 @test_isTitleNonEmpty(ptr %retparam, ptr %9) + %not_err2 = icmp eq i64 %10, 0 + br i1 %not_err2, label %after.errcheck4, label %error3 error3: ; preds = %after.errcheck - store i64 %10, ptr %reterr, align 8 - br label %err_retblock + store i64 %10, ptr %reterr, align 8 + br label %err_retblock after.errcheck4: ; preds = %after.errcheck - %11 = load i8, ptr %retparam, align 1 - store i8 %11, ptr %0, align 1 - ret i64 0 + %11 = load i8, ptr %retparam, align 1 + store i8 %11, ptr %0, align 1 + ret i64 0 err_retblock: ; preds = %error3, %error - %12 = load i64, ptr %reterr, align 8 - ret i64 %12 + %12 = load i64, ptr %reterr, align 8 + ret i64 %12 } ; Function Attrs: nounwind -define ptr @test.bool_to_string(i8 zeroext %0) #0 { +define ptr @test_bool_to_string(i8 zeroext %0) #0 { entry: - %1 = trunc i8 %0 to i1 - %ternary = select i1 %1, %"char[]" { ptr @.str.7, i64 4 }, %"char[]" { ptr @.str.8, i64 5 } - %2 = extractvalue %"char[]" %ternary, 0 - ret ptr %2 + %1 = trunc i8 %0 to i1 + %ternary = select i1 %1, %"char[]" { ptr @.str.7, i64 4 }, %"char[]" { ptr @.str.8, i64 5 } + %2 = extractvalue %"char[]" %ternary, 0 + ret ptr %2 } ; Function Attrs: nounwind -define ptr @test.nameFromError(i64 %0) #0 { +define ptr @test_nameFromError(i64 %0) #0 { entry: - %switch = alloca i64, align 8 - store i64 %0, ptr %switch, align 8 - br label %switch.entry + %switch = alloca i64, align 8 + store i64 %0, ptr %switch, align 8 + br label %switch.entry switch.entry: ; preds = %entry - %1 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @test.TitleResult.TITLE_MISSING to i64), %1 - br i1 %eq, label %switch.case, label %next_if + %1 = load i64, ptr %switch, align 8 + %eq = icmp eq i64 ptrtoint (ptr @"test_TitleResult$TITLE_MISSING" to i64), %1 + br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry - ret ptr @.str.9 + ret ptr @.str.9 next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint (ptr @test.ReadError.BAD_READ to i64), %1 - br i1 %eq1, label %switch.case2, label %next_if3 + %eq1 = icmp eq i64 ptrtoint (ptr @"test_ReadError$BAD_READ" to i64), %1 + br i1 %eq1, label %switch.case2, label %next_if3 switch.case2: ; preds = %next_if - ret ptr @.str.10 + ret ptr @.str.10 next_if3: ; preds = %next_if - %eq4 = icmp eq i64 ptrtoint (ptr @test.ReadError.OUT_OF_MEMORY to i64), %1 - br i1 %eq4, label %switch.case5, label %next_if6 + %eq4 = icmp eq i64 ptrtoint (ptr @"test_ReadError$OUT_OF_MEMORY" to i64), %1 + br i1 %eq4, label %switch.case5, label %next_if6 switch.case5: ; preds = %next_if3 - ret ptr @.str.11 + ret ptr @.str.11 next_if6: ; preds = %next_if3 - br label %switch.default + br label %switch.default switch.default: ; preds = %next_if6 - ret ptr @.str.12 + ret ptr @.str.12 } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: - %URLS = alloca %"char[][]", align 8 - %literal = alloca [5 x %"char[]"], align 16 - %anon = alloca i64, align 8 - %anon1 = alloca %"char[][]", align 8 - %anon2 = alloca i64, align 8 - %url = alloca %"char[]", align 8 - %summary = alloca %Summary, align 8 - %result = alloca %Summary, align 8 - %title_sure = alloca %"char[]", align 8 - %has_title = alloca i8, align 1 - %has_title.f = alloca i64, align 8 - %retparam = alloca i8, align 1 - %0 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 0 - store %"char[]" { ptr @.str.13, i64 4 }, ptr %0, align 8 - %1 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 1 - store %"char[]" { ptr @.str.14, i64 11 }, ptr %1, align 8 - %2 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 2 - store %"char[]" { ptr @.str.15, i64 13 }, ptr %2, align 8 - %3 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 3 - store %"char[]" { ptr @.str.16, i64 12 }, ptr %3, align 8 - %4 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 4 - store %"char[]" { ptr @.str.17, i64 4 }, ptr %4, align 8 - %5 = insertvalue %"char[][]" undef, ptr %literal, 0 - %6 = insertvalue %"char[][]" %5, i64 5, 1 - store %"char[][]" %6, ptr %URLS, align 8 - store i64 0, ptr %anon, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %anon1, ptr align 8 %URLS, i32 16, i1 false) - %7 = getelementptr inbounds %"char[][]", ptr %anon1, i32 0, i32 1 - %8 = load i64, ptr %7, align 8 - store i64 %8, ptr %anon2, align 8 - br label %loop.cond + %URLS = alloca %"char[][]", align 8 + %literal = alloca [5 x %"char[]"], align 16 + %anon = alloca i64, align 8 + %anon1 = alloca %"char[][]", align 8 + %anon2 = alloca i64, align 8 + %url = alloca %"char[]", align 8 + %summary = alloca %Summary, align 8 + %result = alloca %Summary, align 8 + %title_sure = alloca %"char[]", align 8 + %has_title = alloca i8, align 1 + %has_title.f = alloca i64, align 8 + %retparam = alloca i8, align 1 + %0 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 0 + store %"char[]" { ptr @.str.13, i64 4 }, ptr %0, align 8 + %1 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 1 + store %"char[]" { ptr @.str.14, i64 11 }, ptr %1, align 8 + %2 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 2 + store %"char[]" { ptr @.str.15, i64 13 }, ptr %2, align 8 + %3 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 3 + store %"char[]" { ptr @.str.16, i64 12 }, ptr %3, align 8 + %4 = getelementptr inbounds [5 x %"char[]"], ptr %literal, i64 0, i64 4 + store %"char[]" { ptr @.str.17, i64 4 }, ptr %4, align 8 + %5 = insertvalue %"char[][]" undef, ptr %literal, 0 + %6 = insertvalue %"char[][]" %5, i64 5, 1 + store %"char[][]" %6, ptr %URLS, align 8 + store i64 0, ptr %anon, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %anon1, ptr align 8 %URLS, i32 16, i1 false) + %7 = getelementptr inbounds %"char[][]", ptr %anon1, i32 0, i32 1 + %8 = load i64, ptr %7, align 8 + store i64 %8, ptr %anon2, align 8 + br label %loop.cond loop.cond: ; preds = %phi_block11, %entry - %9 = load i64, ptr %anon, align 8 - %10 = load i64, ptr %anon2, align 8 - %lt = icmp ult i64 %9, %10 - br i1 %lt, label %loop.body, label %loop.exit + %9 = load i64, ptr %anon, align 8 + %10 = load i64, ptr %anon2, align 8 + %lt = icmp ult i64 %9, %10 + br i1 %lt, label %loop.body, label %loop.exit loop.body: ; preds = %loop.cond - %11 = getelementptr inbounds %"char[][]", ptr %anon1, i32 0, i32 0 - %12 = load ptr, ptr %11, align 8 - %13 = load i64, ptr %anon, align 8 - %ptroffset = getelementptr inbounds %"char[]", ptr %12, i64 %13 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %url, ptr align 8 %ptroffset, i32 16, i1 false) - %14 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 1 - %15 = load i64, ptr %14, align 8 - %uisitrunc = trunc i64 %15 to i32 - %16 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 0 - %17 = load ptr, ptr %16, align 8 - %18 = call i32 (ptr, ...) @printf(ptr @.str.18, i32 %uisitrunc, ptr %17) - %19 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo = load ptr, ptr %19, align 8 - %20 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi = load i64, ptr %20, align 8 - %21 = call { ptr, i8 } @test.readAndBuildSummary(ptr %lo, i64 %hi) - store { ptr, i8 } %21, ptr %result, align 8 - call void @llvm.memcpy.p0.p0.i32(ptr align 8 %summary, ptr align 8 %result, i32 16, i1 false) - %22 = call i32 (ptr, ...) @printf(ptr @.str.19) - %23 = load ptr, ptr @__stdoutp, align 8 - call void @test.Summary__print(ptr %summary, ptr %23) - %24 = call i32 (ptr, ...) @printf(ptr @.str.20) - %25 = getelementptr inbounds %Summary, ptr %summary, i32 0, i32 0 - %26 = load ptr, ptr %25, align 8 - %ptrbool = icmp ne ptr %26, null - br i1 %ptrbool, label %cond.lhs, label %cond.rhs + %11 = getelementptr inbounds %"char[][]", ptr %anon1, i32 0, i32 0 + %12 = load ptr, ptr %11, align 8 + %13 = load i64, ptr %anon, align 8 + %ptroffset = getelementptr inbounds %"char[]", ptr %12, i64 %13 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %url, ptr align 8 %ptroffset, i32 16, i1 false) + %14 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 1 + %15 = load i64, ptr %14, align 8 + %uisitrunc = trunc i64 %15 to i32 + %16 = getelementptr inbounds %"char[]", ptr %url, i32 0, i32 0 + %17 = load ptr, ptr %16, align 8 + %18 = call i32 (ptr, ...) @printf(ptr @.str.18, i32 %uisitrunc, ptr %17) + %19 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo = load ptr, ptr %19, align 8 + %20 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi = load i64, ptr %20, align 8 + %21 = call { ptr, i8 } @test_readAndBuildSummary(ptr %lo, i64 %hi) + store { ptr, i8 } %21, ptr %result, align 8 + call void @llvm.memcpy.p0.p0.i32(ptr align 8 %summary, ptr align 8 %result, i32 16, i1 false) + %22 = call i32 (ptr, ...) @printf(ptr @.str.19) + %23 = load ptr, ptr @__stdoutp, align 8 + call void @test_Summary_print(ptr %summary, ptr %23) + %24 = call i32 (ptr, ...) @printf(ptr @.str.20) + %25 = getelementptr inbounds %Summary, ptr %summary, i32 0, i32 0 + %26 = load ptr, ptr %25, align 8 + %ptrbool = icmp ne ptr %26, null + br i1 %ptrbool, label %cond.lhs, label %cond.rhs cond.lhs: ; preds = %loop.body - %27 = getelementptr inbounds %Summary, ptr %summary, i32 0, i32 0 - %28 = load ptr, ptr %27, align 8 - %29 = load %"char[]", ptr %28, align 8 - br label %cond.phi + %27 = getelementptr inbounds %Summary, ptr %summary, i32 0, i32 0 + %28 = load ptr, ptr %27, align 8 + %29 = load %"char[]", ptr %28, align 8 + br label %cond.phi cond.rhs: ; preds = %loop.body - br label %cond.phi + br label %cond.phi cond.phi: ; preds = %cond.rhs, %cond.lhs - %val = phi %"char[]" [ %29, %cond.lhs ], [ { ptr @.str.21, i64 0 }, %cond.rhs ] - store %"char[]" %val, ptr %title_sure, align 8 - %30 = getelementptr inbounds %"char[]", ptr %title_sure, i32 0, i32 1 - %31 = load i64, ptr %30, align 8 - %uisitrunc3 = trunc i64 %31 to i32 - %32 = getelementptr inbounds %"char[]", ptr %title_sure, i32 0, i32 0 - %33 = load ptr, ptr %32, align 8 - %34 = call i32 (ptr, ...) @printf(ptr @.str.22, i32 %uisitrunc3, ptr %33) - %35 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 - %lo4 = load ptr, ptr %35, align 8 - %36 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 - %hi5 = load i64, ptr %36, align 8 - %37 = call i64 @test.readWhetherTitleNonEmpty(ptr %retparam, ptr %lo4, i64 %hi5) - %not_err = icmp eq i64 %37, 0 - br i1 %not_err, label %after.errcheck, label %error + %val = phi %"char[]" [ %29, %cond.lhs ], [ { ptr @.str.21, i64 0 }, %cond.rhs ] + store %"char[]" %val, ptr %title_sure, align 8 + %30 = getelementptr inbounds %"char[]", ptr %title_sure, i32 0, i32 1 + %31 = load i64, ptr %30, align 8 + %uisitrunc3 = trunc i64 %31 to i32 + %32 = getelementptr inbounds %"char[]", ptr %title_sure, i32 0, i32 0 + %33 = load ptr, ptr %32, align 8 + %34 = call i32 (ptr, ...) @printf(ptr @.str.22, i32 %uisitrunc3, ptr %33) + %35 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 0 + %lo4 = load ptr, ptr %35, align 8 + %36 = getelementptr inbounds { ptr, i64 }, ptr %url, i32 0, i32 1 + %hi5 = load i64, ptr %36, align 8 + %37 = call i64 @test_readWhetherTitleNonEmpty(ptr %retparam, ptr %lo4, i64 %hi5) + %not_err = icmp eq i64 %37, 0 + br i1 %not_err, label %after.errcheck, label %error error: ; preds = %cond.phi - store i64 %37, ptr %has_title.f, align 8 - br label %after_assign + store i64 %37, ptr %has_title.f, align 8 + br label %after_assign after.errcheck: ; preds = %cond.phi - %38 = load i8, ptr %retparam, align 1 - store i8 %38, ptr %has_title, align 1 - store i64 0, ptr %has_title.f, align 8 - br label %after_assign + %38 = load i8, ptr %retparam, align 1 + store i8 %38, ptr %has_title, align 1 + store i64 0, ptr %has_title.f, align 8 + br label %after_assign after_assign: ; preds = %after.errcheck, %error - %39 = load i64, ptr %has_title.f, align 8 - %not_err6 = icmp eq i64 %39, 0 - br i1 %not_err6, label %after_check, label %else_block + %39 = load i64, ptr %has_title.f, align 8 + %not_err6 = icmp eq i64 %39, 0 + br i1 %not_err6, label %after_check, label %else_block after_check: ; preds = %after_assign - %40 = load i8, ptr %has_title, align 1 - %41 = call ptr @test.bool_to_string(i8 %40) - br label %phi_block + %40 = load i8, ptr %has_title, align 1 + %41 = call ptr @test_bool_to_string(i8 %40) + br label %phi_block else_block: ; preds = %after_assign - %42 = load i64, ptr %has_title.f, align 8 - %43 = call ptr @test.nameFromError(i64 %42) - br label %phi_block + %42 = load i64, ptr %has_title.f, align 8 + %43 = call ptr @test_nameFromError(i64 %42) + br label %phi_block phi_block: ; preds = %else_block, %after_check - %val7 = phi ptr [ %41, %after_check ], [ %43, %else_block ] - %44 = load i64, ptr %has_title.f, align 8 - %not_err8 = icmp eq i64 %44, 0 - br i1 %not_err8, label %after_check9, label %else_block10 + %val7 = phi ptr [ %41, %after_check ], [ %43, %else_block ] + %44 = load i64, ptr %has_title.f, align 8 + %not_err8 = icmp eq i64 %44, 0 + br i1 %not_err8, label %after_check9, label %else_block10 after_check9: ; preds = %phi_block - %45 = load i8, ptr %has_title, align 1 - %46 = trunc i8 %45 to i1 - br label %phi_block11 + %45 = load i8, ptr %has_title, align 1 + %46 = trunc i8 %45 to i1 + br label %phi_block11 else_block10: ; preds = %phi_block - br label %phi_block11 + br label %phi_block11 phi_block11: ; preds = %else_block10, %after_check9 - %val12 = phi i1 [ %46, %after_check9 ], [ false, %else_block10 ] - %ternary = select i1 %val12, ptr @.str.24, ptr @.str.25 - %47 = call i32 (ptr, ...) @printf(ptr @.str.23, ptr %val7, ptr %ternary) - %48 = load i64, ptr %anon, align 8 - %add = add i64 %48, 1 - store i64 %add, ptr %anon, align 8 - br label %loop.cond + %val12 = phi i1 [ %46, %after_check9 ], [ false, %else_block10 ] + %ternary = select i1 %val12, ptr @.str.24, ptr @.str.25 + %47 = call i32 (ptr, ...) @printf(ptr @.str.23, ptr %val7, ptr %ternary) + %48 = load i64, ptr %anon, align 8 + %add = add i64 %48, 1 + store i64 %add, ptr %anon, align 8 + br label %loop.cond loop.exit: ; preds = %loop.cond - ret void + ret void } diff --git a/test/test_suite2/errors/failable_inits.c3t b/test/test_suite2/errors/failable_inits.c3t index 0ef3b14df..3173bd79d 100644 --- a/test/test_suite2/errors/failable_inits.c3t +++ b/test/test_suite2/errors/failable_inits.c3t @@ -33,14 +33,14 @@ fn void main() /* #expect: test.ll -define i64 @test.test1() #0 { +define i64 @test_test1() #0 { entry: %x = alloca %Bar, align 4 %x.f = alloca i64, align 8 %y = alloca %Bar, align 4 %error_var = alloca i64, align 8 %reterr = alloca i64, align 8 - store i64 ptrtoint (ptr @test.Foo.MY_VAL1 to i64), ptr %x.f, align 8 + store i64 ptrtoint (ptr @"test_Foo$MY_VAL1" to i64), ptr %x.f, align 8 %0 = load i64, ptr %x.f, align 8 %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after_check, label %error @@ -61,7 +61,7 @@ noerr_block: ; preds = %after_check ret i64 0 } -define i64 @test.test2() #0 { +define i64 @test_test2() #0 { entry: %x = alloca %Bar, align 4 %x.f = alloca i64, align 8 @@ -91,9 +91,9 @@ noerr_block: ; preds = %after_check } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: - %0 = call i64 @test.test1() + %0 = call i64 @test_test1() %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %voiderr @@ -101,7 +101,7 @@ after.errcheck: ; preds = %entry br label %voiderr voiderr: ; preds = %after.errcheck, %entry - %1 = call i64 @test.test2() + %1 = call i64 @test_test2() %not_err1 = icmp eq i64 %1, 0 br i1 %not_err1, label %after.errcheck2, label %voiderr3 diff --git a/test/test_suite2/errors/failable_taddr_and_access.c3t b/test/test_suite2/errors/failable_taddr_and_access.c3t index ad2d2914a..e36593e5c 100644 --- a/test/test_suite2/errors/failable_taddr_and_access.c3t +++ b/test/test_suite2/errors/failable_taddr_and_access.c3t @@ -27,9 +27,9 @@ fn void main() %Foo = type { i32, i32 } -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@test.MyErr.FOO = linkonce constant i8 1, align 1 -@.typeid.test.MyErr = linkonce constant { i8, i64, [1 x i64] } { i8 9, i64 1, [1 x i64] [i64 ptrtoint (ptr @test.MyErr.FOO to i64)] }, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"test_MyErr$FOO" = linkonce constant i8 1, align 1 +@"ct$test_MyErr" = linkonce constant %.introspect { i8 9, i64 8, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [17 x i8] c"Not visible: %d\0A\00", align 1 @@ -37,7 +37,7 @@ fn void main() declare i32 @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %z = alloca i32, align 4 %z.f = alloca i64, align 8 @@ -78,7 +78,7 @@ after_check2: ; preds = %after_assign br label %voiderr voiderr: ; preds = %after_check2, %after_assign - store i64 ptrtoint (ptr @test.MyErr.FOO to i64), ptr %z.f, align 8 + store i64 ptrtoint (ptr @"test_MyErr$FOO" to i64), ptr %z.f, align 8 br label %voiderr3 voiderr3: ; preds = %voiderr diff --git a/test/test_suite2/errors/general_error_regression.c3t b/test/test_suite2/errors/general_error_regression.c3t index 0e20bce28..d20daf4a1 100644 --- a/test/test_suite2/errors/general_error_regression.c3t +++ b/test/test_suite2/errors/general_error_regression.c3t @@ -72,25 +72,25 @@ fn void main() /* #expect: foo.ll -define void @foo.Foo__hello(ptr %0) #0 { +define void @foo_Foo_hello(ptr %0) #0 { entry: - %1 = call i32 @"std::io.println"(ptr @.str.6) #1 + %1 = call i32 @std_io_println(ptr @.str.6) #1 ret void } -define void @foo.Bar__hello(ptr %0) #0 { +define void @foo_Bar_hello(ptr %0) #0 { entry: - %1 = call i32 @"std::io.println"(ptr @.str.7) #1 + %1 = call i32 @std_io_println(ptr @.str.7) #1 ret void } -define void @foo.MyEnum__hello(ptr %0) #0 { +define void @foo_MyEnum_hello(ptr %0) #0 { entry: - %1 = call i32 @"std::io.println"(ptr @.str.8) #1 + %1 = call i32 @std_io_println(ptr @.str.8) #1 ret void } -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %f = alloca i64, align 8 %ef = alloca i64, align 8 @@ -98,8 +98,8 @@ entry: %z = alloca i64, align 8 %b = alloca i32, align 4 %a = alloca i32, align 4 - store i64 ptrtoint (ptr @foo.Foo.X to i64), ptr %f, align 8 - store i64 ptrtoint (ptr @foo.Foo.Y to i64), ptr %ef, align 8 + store i64 ptrtoint (ptr @"foo_Foo$X" to i64), ptr %f, align 8 + store i64 ptrtoint (ptr @"foo_Foo$Y" to i64), ptr %ef, align 8 %0 = load i64, ptr %f, align 8 store i64 %0, ptr %x, align 8 %1 = load i64, ptr %x, align 8 @@ -112,30 +112,30 @@ entry: store i64 %5, ptr %z, align 8 %6 = load i64, ptr %z, align 8 %7 = call i32 (ptr, ...) @printf(ptr @.str.1, i64 %6) - store i64 ptrtoint (ptr @foo.Foo.W to i64), ptr %x, align 8 + store i64 ptrtoint (ptr @"foo_Foo$W" to i64), ptr %x, align 8 %8 = load i64, ptr %x, align 8 store i64 %8, ptr %z, align 8 %9 = load i64, ptr %z, align 8 %10 = call i32 (ptr, ...) @printf(ptr @.str.2, i64 %9) - store i64 ptrtoint (ptr @foo.Foo.W1 to i64), ptr %x, align 8 + store i64 ptrtoint (ptr @"foo_Foo$W1" to i64), ptr %x, align 8 %11 = load i64, ptr %x, align 8 store i64 %11, ptr %z, align 8 %12 = load i64, ptr %z, align 8 %13 = call i32 (ptr, ...) @printf(ptr @.str.3, i64 %12) - store i64 ptrtoint (ptr @foo.Foob.X1 to i64), ptr %x, align 8 + store i64 ptrtoint (ptr @"foo_Foob$X1" to i64), ptr %x, align 8 %14 = load i64, ptr %x, align 8 store i64 %14, ptr %z, align 8 %15 = load i64, ptr %z, align 8 %16 = call i32 (ptr, ...) @printf(ptr @.str.4, i64 %15) - store i64 ptrtoint (ptr @foo.Foob.Y2 to i64), ptr %x, align 8 + store i64 ptrtoint (ptr @"foo_Foob$Y2" to i64), ptr %x, align 8 %17 = load i64, ptr %x, align 8 store i64 %17, ptr %z, align 8 %18 = load i64, ptr %z, align 8 %19 = call i32 (ptr, ...) @printf(ptr @.str.5, i64 %18) store i32 0, ptr %b, align 4 store i32 0, ptr %a, align 4 - call void @foo.Foo__hello(ptr %f) - call void @foo.Bar__hello(ptr %b) - call void @foo.MyEnum__hello(ptr %a) + call void @foo_Foo_hello(ptr %f) + call void @foo_Bar_hello(ptr %b) + call void @foo_MyEnum_hello(ptr %a) ret void } \ No newline at end of file diff --git a/test/test_suite2/errors/macro_err.c3t b/test/test_suite2/errors/macro_err.c3t index 1732198de..85591f886 100644 --- a/test/test_suite2/errors/macro_err.c3t +++ b/test/test_suite2/errors/macro_err.c3t @@ -18,7 +18,7 @@ fn void main() /* #expect: test.ll -define i64 @test.abc(ptr %0) #0 { +define i64 @test_abc(ptr %0) #0 { entry: %reterr = alloca i64, align 8 store i32 1, ptr %0, align 4 @@ -26,11 +26,11 @@ entry: } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %error_var = alloca i64, align 8 %retparam = alloca i32, align 4 - %0 = call i64 @test.abc(ptr %retparam) + %0 = call i64 @test_abc(ptr %retparam) %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %error diff --git a/test/test_suite2/errors/macro_err2.c3t b/test/test_suite2/errors/macro_err2.c3t index a279c57f1..368d29d9d 100644 --- a/test/test_suite2/errors/macro_err2.c3t +++ b/test/test_suite2/errors/macro_err2.c3t @@ -21,16 +21,16 @@ fn void main() /* #expect: test.ll -define i64 @test.abc(ptr %0) #0 { +define i64 @test_abc(ptr %0) #0 { entry: - ret i64 ptrtoint (ptr @test.Tester.FOO to i64) + ret i64 ptrtoint (ptr @"test_Tester$FOO" to i64) } -define void @test.main() #0 { +define void @test_main() #0 { entry: %blockret = alloca i32, align 4 %retparam = alloca i32, align 4 - %0 = call i64 @test.abc(ptr %retparam) + %0 = call i64 @test_abc(ptr %retparam) %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %opt_block_cleanup @@ -56,4 +56,4 @@ phi_block: ; preds = %else_block, %expr_b %5 = call i32 (ptr, ...) @printf(ptr @.str, i32 %val) %6 = call i32 (ptr, ...) @printf(ptr @.str.3) ret void -} \ No newline at end of file +} diff --git a/test/test_suite2/errors/macro_err3.c3t b/test/test_suite2/errors/macro_err3.c3t index 6b6b045ea..1e743a38e 100644 --- a/test/test_suite2/errors/macro_err3.c3t +++ b/test/test_suite2/errors/macro_err3.c3t @@ -18,7 +18,7 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %blockret = alloca i32, align 4 br label %opt_block_cleanup diff --git a/test/test_suite2/errors/or_err_bool.c3t b/test/test_suite2/errors/or_err_bool.c3t index d516afda8..907278754 100644 --- a/test/test_suite2/errors/or_err_bool.c3t +++ b/test/test_suite2/errors/or_err_bool.c3t @@ -10,7 +10,7 @@ fn void tester() /* #expect: test.ll -define void @test.tester() #0 { +define void @test_tester() #0 { entry: %x = alloca i8, align 1 %x.f = alloca i64, align 8 diff --git a/test/test_suite2/errors/rethrow_mingw.c3t b/test/test_suite2/errors/rethrow_mingw.c3t index 529c386d2..386184673 100644 --- a/test/test_suite2/errors/rethrow_mingw.c3t +++ b/test/test_suite2/errors/rethrow_mingw.c3t @@ -10,7 +10,7 @@ fn void! test() // #expect: rethrow.ll -define i64 @rethrow.test() #0 { +define i64 @rethrow_test() #0 { entry: %i = alloca i32, align 4 %i.f = alloca i64, align 8 diff --git a/test/test_suite2/errors/simple_static_failable.c3t b/test/test_suite2/errors/simple_static_failable.c3t index eb805bc39..9e83c22bd 100644 --- a/test/test_suite2/errors/simple_static_failable.c3t +++ b/test/test_suite2/errors/simple_static_failable.c3t @@ -15,10 +15,10 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 %i.f = alloca i64, align 8 - store i64 ptrtoint (ptr @foo.Blurg.Y to i64), ptr %i.f, align 8 + store i64 ptrtoint (ptr @"foo_Blurg$Y" to i64), ptr %i.f, align 8 ret void } \ No newline at end of file diff --git a/test/test_suite2/errors/try_assign.c3t b/test/test_suite2/errors/try_assign.c3t index 30f94cab2..055e4753c 100644 --- a/test/test_suite2/errors/try_assign.c3t +++ b/test/test_suite2/errors/try_assign.c3t @@ -28,7 +28,7 @@ fn void main() /* #expect: try_assign.ll -define void @try_assign.main() #0 { +define void @try_assign_main() #0 { entry: %x = alloca i32, align 4 %z = alloca i32, align 4 diff --git a/test/test_suite2/errors/try_catch_if.c3t b/test/test_suite2/errors/try_catch_if.c3t index 23bdcc632..ad41df15f 100644 --- a/test/test_suite2/errors/try_catch_if.c3t +++ b/test/test_suite2/errors/try_catch_if.c3t @@ -37,7 +37,7 @@ fn void main() /* #expect: try_catch_if.ll -define i64 @try_catch_if.tester(ptr %0) #0 { +define i64 @try_catch_if_tester(ptr %0) #0 { entry: %reterr = alloca i64, align 8 %1 = call i32 (ptr, ...) @printf(ptr @.str) @@ -45,7 +45,7 @@ entry: ret i64 0 } -define void @try_catch_if.test1() #0 { +define void @try_catch_if_test1() #0 { entry: %a = alloca i32, align 4 %a.f = alloca i64, align 8 @@ -68,7 +68,7 @@ after_check: ; preds = %testblock br label %testblock1 testblock1: ; preds = %after_check - %1 = call i64 @try_catch_if.tester(ptr %retparam) + %1 = call i64 @try_catch_if_tester(ptr %retparam) %not_err2 = icmp eq i64 %1, 0 br i1 %not_err2, label %after.errcheck, label %error3 diff --git a/test/test_suite2/errors/try_unwrap_using_assert.c3t b/test/test_suite2/errors/try_unwrap_using_assert.c3t index 9952a9b0c..434ef9d0c 100644 --- a/test/test_suite2/errors/try_unwrap_using_assert.c3t +++ b/test/test_suite2/errors/try_unwrap_using_assert.c3t @@ -13,7 +13,7 @@ fn int tester(int n) // #expect: test.ll -define i32 @test.tester(i32 %0) #0 { +define i32 @test_tester(i32 %0) #0 { entry: %num = alloca i32, align 4 %num.f = alloca i64, align 8 diff --git a/test/test_suite2/errors/try_with_chained_unwrap.c3t b/test/test_suite2/errors/try_with_chained_unwrap.c3t index 8c5078ab3..796f6e98d 100644 --- a/test/test_suite2/errors/try_with_chained_unwrap.c3t +++ b/test/test_suite2/errors/try_with_chained_unwrap.c3t @@ -19,7 +19,7 @@ fn void main() /* #expect: try_with_chained_unwrap.ll -define void @try_with_chained_unwrap.main() #0 { +define void @try_with_chained_unwrap_main() #0 { entry: %val = alloca i32, align 4 %retparam = alloca i32, align 4 diff --git a/test/test_suite2/errors/try_with_unwrap.c3t b/test/test_suite2/errors/try_with_unwrap.c3t index dd96639cb..a1f6cefa6 100644 --- a/test/test_suite2/errors/try_with_unwrap.c3t +++ b/test/test_suite2/errors/try_with_unwrap.c3t @@ -21,7 +21,7 @@ fn void main() /* #expect: try_with_unwrap.ll -define void @try_with_unwrap.main() #0 { +define void @try_with_unwrap_main() #0 { entry: %line = alloca ptr, align 8 %line.f = alloca i64, align 8 diff --git a/test/test_suite2/errors/try_with_unwrapper.c3t b/test/test_suite2/errors/try_with_unwrapper.c3t index e5bcca156..be4584afd 100644 --- a/test/test_suite2/errors/try_with_unwrapper.c3t +++ b/test/test_suite2/errors/try_with_unwrapper.c3t @@ -45,7 +45,7 @@ fn void test2() ; Function Attrs: nounwind -define i32 @try_with_unwrapper.hello(i32 %0) #0 { +define i32 @try_with_unwrapper_hello(i32 %0) #0 { entry: %add = add i32 %0, 1 ret i32 %add @@ -55,7 +55,7 @@ entry: declare i32 @printf(ptr, ...) #0 ; Function Attrs: nounwind -define i64 @try_with_unwrapper.tester(ptr %0) #0 { +define i64 @try_with_unwrapper_tester(ptr %0) #0 { entry: %reterr = alloca i64, align 8 %1 = call i32 (ptr, ...) @printf(ptr @.str) @@ -64,7 +64,7 @@ entry: } ; Function Attrs: nounwind -define void @try_with_unwrapper.test1() #0 { +define void @try_with_unwrapper_test1() #0 { entry: %a = alloca i32, align 4 %a.f = alloca i64, align 8 @@ -92,7 +92,7 @@ phi_try_catch: ; preds = %catch_landing, %aft chain_next: ; preds = %phi_try_catch store i32 0, ptr %c, align 4 - %2 = call i64 @try_with_unwrapper.tester(ptr %retparam) + %2 = call i64 @try_with_unwrapper_tester(ptr %retparam) %not_err1 = icmp eq i64 %2, 0 br i1 %not_err1, label %after.errcheck, label %catch_landing2 @@ -120,7 +120,7 @@ end_chain: ; preds = %fail_chain, %chain_ if.then: ; preds = %end_chain %4 = load i32, ptr %b, align 4 - %5 = call i32 @try_with_unwrapper.hello(i32 %4) + %5 = call i32 @try_with_unwrapper_hello(i32 %4) %6 = call i32 (ptr, ...) @printf(ptr @.str.1, i32 %5) %7 = load i32, ptr %c, align 4 %8 = call i32 (ptr, ...) @printf(ptr @.str.2, i32 %7) @@ -132,7 +132,7 @@ if.exit: ; preds = %if.then, %end_chain ; Function Attrs: nounwind -define void @try_with_unwrapper.test2() #0 { +define void @try_with_unwrapper_test2() #0 { entry: %a = alloca i32, align 4 %a.f = alloca i64, align 8 @@ -158,7 +158,7 @@ phi_try_catch: ; preds = %catch_landing, %aft chain_next: ; preds = %phi_try_catch %2 = load i32, ptr %b, align 4 - %3 = call i32 @try_with_unwrapper.hello(i32 %2) + %3 = call i32 @try_with_unwrapper_hello(i32 %2) %intbool = icmp ne i32 %3, 0 br i1 %intbool, label %chain_next1, label %fail_chain @@ -175,7 +175,7 @@ end_chain: ; preds = %fail_chain, %chain_ if.then: ; preds = %end_chain %4 = load i32, ptr %b, align 4 %add = add i32 %4, 1 - %5 = call i32 @try_with_unwrapper.hello(i32 %add) + %5 = call i32 @try_with_unwrapper_hello(i32 %add) br label %if.exit if.exit: ; preds = %if.then, %end_chain diff --git a/test/test_suite2/expressions/addr_compiles.c3t b/test/test_suite2/expressions/addr_compiles.c3t index 68a7010d5..b69bb3107 100644 --- a/test/test_suite2/expressions/addr_compiles.c3t +++ b/test/test_suite2/expressions/addr_compiles.c3t @@ -49,16 +49,16 @@ fn void test3() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: - call void @test.test() - call void @test.test2() - call void @test.test3() + call void @test_test() + call void @test_test2() + call void @test_test3() ret void } ; Function Attrs: nounwind -define void @test.test() #0 { +define void @test_test() #0 { entry: %f = alloca i32, align 4 %x = alloca ptr, align 8 @@ -80,10 +80,10 @@ entry: } ; Function Attrs: nounwind -define void @test.test2() #0 { +define void @test_test2() #0 { entry: %w = alloca ptr, align 8 - store ptr @test.XX, ptr %w, align 8 + store ptr @test_XX, ptr %w, align 8 %0 = load ptr, ptr %w, align 8 %1 = load i32, ptr %0, align 8 call void (ptr, ...) @printf(ptr @.str.1, i32 %1) @@ -91,7 +91,7 @@ entry: } ; Function Attrs: nounwind -define void @test.test3() #0 { +define void @test_test3() #0 { entry: %h = alloca %Foo, align 4 %zx = alloca ptr, align 8 diff --git a/test/test_suite2/expressions/call_inline.c3t b/test/test_suite2/expressions/call_inline.c3t index 57c0df0fe..b37a192b0 100644 --- a/test/test_suite2/expressions/call_inline.c3t +++ b/test/test_suite2/expressions/call_inline.c3t @@ -31,15 +31,15 @@ fn void main() // #expect: inlineme.ll entry: - call void @inlineme.test1() #2 - call void @inlineme.test2() #2 - call void @inlineme.test3() #2 - call void @inlineme.test1() #3 - call void @inlineme.test2() #3 - call void @inlineme.test3() #3 - call void @inlineme.test1() #2 - call void @inlineme.test2() - call void @inlineme.test3() + call void @inlineme_test1() #2 + call void @inlineme_test2() #2 + call void @inlineme_test3() #2 + call void @inlineme_test1() #3 + call void @inlineme_test2() #3 + call void @inlineme_test3() #3 + call void @inlineme_test1() #2 + call void @inlineme_test2() + call void @inlineme_test3() ret void } diff --git a/test/test_suite2/expressions/chained_conditional.c3t b/test/test_suite2/expressions/chained_conditional.c3t index 1b476226c..b28e3b0e7 100644 --- a/test/test_suite2/expressions/chained_conditional.c3t +++ b/test/test_suite2/expressions/chained_conditional.c3t @@ -26,11 +26,11 @@ entry: %x = alloca i32, align 4 %y = alloca i32, align 4 %z = alloca i32, align 4 - %0 = call i32 @chained.foo() + %0 = call i32 @chained_foo() store i32 %0, ptr %x, align 4 - %1 = call i32 @chained.foo() + %1 = call i32 @chained_foo() store i32 %1, ptr %y, align 4 - %2 = call i32 @chained.foo() + %2 = call i32 @chained_foo() store i32 %2, ptr %z, align 4 %3 = load i32, ptr %x, align 4 %gt = icmp sgt i32 %3, 0 @@ -55,7 +55,7 @@ and.phi4: br i1 %val5, label %if.then, label %if.else if.then: - %6 = call i32 @chained.foo() + %6 = call i32 @chained_foo() br label %if.exit if.else: diff --git a/test/test_suite2/expressions/elvis.c3t b/test/test_suite2/expressions/elvis.c3t index 86a464b46..05682ed87 100644 --- a/test/test_suite2/expressions/elvis.c3t +++ b/test/test_suite2/expressions/elvis.c3t @@ -17,7 +17,7 @@ fn bool elvis3(bool x, bool y) // #expect: elvis.ll -define ptr @elvis.elvis(ptr %0, ptr %1) #0 { +define ptr @elvis_elvis(ptr %0, ptr %1) #0 { entry: %ptrbool = icmp ne ptr %0, null br i1 %ptrbool, label %cond.phi, label %cond.rhs @@ -30,7 +30,7 @@ cond.phi: ; preds = %cond.rhs, %entry ret ptr %val } -define ptr @elvis.elvis2(ptr %0, ptr %1) #0 { +define ptr @elvis_elvis2(ptr %0, ptr %1) #0 { entry: %ptrbool = icmp ne ptr %0, null br i1 %ptrbool, label %cond.phi3, label %cond.rhs @@ -51,7 +51,7 @@ cond.phi3: ; preds = %cond.phi, %entry ret ptr %val4 } -define zeroext i8 @elvis.elvis3(i8 zeroext %0, i8 zeroext %1) #0 { +define zeroext i8 @elvis_elvis3(i8 zeroext %0, i8 zeroext %1) #0 { entry: %2 = trunc i8 %0 to i1 br i1 %2, label %cond.phi, label %cond.rhs diff --git a/test/test_suite2/expressions/folding_ptr.c3t b/test/test_suite2/expressions/folding_ptr.c3t index cb56076a4..05f01edc0 100644 --- a/test/test_suite2/expressions/folding_ptr.c3t +++ b/test/test_suite2/expressions/folding_ptr.c3t @@ -16,7 +16,7 @@ fn int f() /* #expect: test.ll -define i32 @test.f() #0 { +define i32 @test_f() #0 { entry: %0 = load ptr, ptr @cfun, align 8 %ptroffset = getelementptr %Test, ptr %0, i64 0 diff --git a/test/test_suite2/expressions/parsed_numbers.c3t b/test/test_suite2/expressions/parsed_numbers.c3t index ce2809a64..cb4e46d16 100644 --- a/test/test_suite2/expressions/parsed_numbers.c3t +++ b/test/test_suite2/expressions/parsed_numbers.c3t @@ -7,7 +7,7 @@ double d = 12.3e+12; // #expect: numbers.ll -@numbers.a = local_unnamed_addr global double 2.125000e+00, align 8 -@numbers.b = local_unnamed_addr global double -1.230000e-11, align 8 -@numbers.c = local_unnamed_addr global double 5.312500e-01, align 8 -@numbers.d = local_unnamed_addr global double 1.230000e+13, align 8 \ No newline at end of file +@numbers_a = local_unnamed_addr global double 2.125000e+00, align 8 +@numbers_b = local_unnamed_addr global double -1.230000e-11, align 8 +@numbers_c = local_unnamed_addr global double 5.312500e-01, align 8 +@numbers_d = local_unnamed_addr global double 1.230000e+13, align 8 \ No newline at end of file diff --git a/test/test_suite2/expressions/pointer_access.c3t b/test/test_suite2/expressions/pointer_access.c3t index 680e20d9b..ad7d61917 100644 --- a/test/test_suite2/expressions/pointer_access.c3t +++ b/test/test_suite2/expressions/pointer_access.c3t @@ -42,13 +42,13 @@ fn void testSimple() %anon = type { i32, i32 } %anon.0 = type { double } -@.typeid.pointer_access.c = linkonce constant { i8, i64 } { i8 10, i64 5 }, align 8 -@.typeid.pointer_access.anon = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@.typeid.pointer_access.anon.1 = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.pointer_access.ExtraSimple = linkonce constant { i8, i64 } { i8 10, i64 6 }, align 8 +@"ct$pointer_access_c" = linkonce constant %.introspect { i8 10, i64 40, i64 0, i64 5, [0 x i64] zeroinitializer }, align 8 +@"ct$pointer_access_anon" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$pointer_access_anon.4" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$pointer_access_ExtraSimple" = linkonce constant %.introspect { i8 10, i64 72, i64 0, i64 6, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [71 x i8] c"a = %d, c.e = %f, c.f = %f, c.j = %f, g = %d, o0 = %f, r = %d, s = %d\0A\00", align 1 -define void @pointer_access.testSimple() #0 { +define void @pointer_access_testSimple() #0 { entry: %a = alloca %ExtraSimple, align 8 %0 = getelementptr inbounds %ExtraSimple, ptr %a, i32 0, i32 0 diff --git a/test/test_suite2/expressions/simple_float_sub_neg.c3t b/test/test_suite2/expressions/simple_float_sub_neg.c3t index 79cb304ab..73d01cbd0 100644 --- a/test/test_suite2/expressions/simple_float_sub_neg.c3t +++ b/test/test_suite2/expressions/simple_float_sub_neg.c3t @@ -7,7 +7,7 @@ fn double test(double a, double b, double c, double d) // #expect: simple_float_sub_neg.ll -define double @simple_float_sub_neg.test(double %0, double %1, double %2, double %3) #0 { +define double @simple_float_sub_neg_test(double %0, double %1, double %2, double %3) #0 { entry: %fsub = fsub double %0, %1 %fneg = fneg double %fsub diff --git a/test/test_suite2/expressions/ternary_bool.c3t b/test/test_suite2/expressions/ternary_bool.c3t index 1cc7e274d..2097a2bad 100644 --- a/test/test_suite2/expressions/ternary_bool.c3t +++ b/test/test_suite2/expressions/ternary_bool.c3t @@ -15,7 +15,7 @@ fn void main() /* #expect: ternary_bool.ll -define void @ternary_bool.main() #0 { +define void @ternary_bool_main() #0 { entry: %b = alloca i8, align 1 %c = alloca ptr, align 8 diff --git a/test/test_suite2/failable_catch.c3t b/test/test_suite2/failable_catch.c3t index c9710fb23..ce1b96c90 100644 --- a/test/test_suite2/failable_catch.c3t +++ b/test/test_suite2/failable_catch.c3t @@ -55,7 +55,7 @@ if.then: ; preds = %entry br label %expr_block.exit if.exit: ; preds = %entry - store i64 ptrtoint (ptr @failable_catch.MyErr.TEST to i64), ptr %a.f, align 8 + store i64 ptrtoint (ptr @"failable_catch_MyErr$TEST" to i64), ptr %a.f, align 8 br label %after_assign expr_block.exit: ; preds = %if.then @@ -90,7 +90,7 @@ if.then4: ; preds = %phi_block br label %expr_block.exit6 if.exit5: ; preds = %phi_block - store i64 ptrtoint (ptr @failable_catch.MyErr.TEST to i64), ptr %b.f, align 8 + store i64 ptrtoint (ptr @"failable_catch_MyErr$TEST" to i64), ptr %b.f, align 8 br label %after_assign7 expr_block.exit6: ; preds = %if.then4 @@ -111,7 +111,7 @@ if.then11: ; preds = %after_assign7 br label %expr_block.exit13 if.exit12: ; preds = %after_assign7 - store i64 ptrtoint (ptr @failable_catch.MyErr.TEST to i64), ptr %c.f, align 8 + store i64 ptrtoint (ptr @"failable_catch_MyErr$TEST" to i64), ptr %c.f, align 8 br label %after_assign14 expr_block.exit13: ; preds = %if.then11 diff --git a/test/test_suite2/floats/convert_float.c3t b/test/test_suite2/floats/convert_float.c3t index cb06a173e..533849d35 100644 --- a/test/test_suite2/floats/convert_float.c3t +++ b/test/test_suite2/floats/convert_float.c3t @@ -9,7 +9,7 @@ fn void test() } /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %x = alloca float, align 4 %y = alloca double, align 8 diff --git a/test/test_suite2/floats/mod.c3t b/test/test_suite2/floats/mod.c3t index 54762f05a..136d8a2f5 100644 --- a/test/test_suite2/floats/mod.c3t +++ b/test/test_suite2/floats/mod.c3t @@ -7,7 +7,7 @@ fn double x(double a, double b) /* #expect: mod.ll -define double @mod.x(double %0, double %1) #0 { +define double @mod_x(double %0, double %1) #0 { entry: %fmod = frem double %0, %1 ret double %fmod diff --git a/test/test_suite2/from_docs/examples_defer.c3t b/test/test_suite2/from_docs/examples_defer.c3t index 42ec2e56b..4bc7ddd58 100644 --- a/test/test_suite2/from_docs/examples_defer.c3t +++ b/test/test_suite2/from_docs/examples_defer.c3t @@ -23,14 +23,14 @@ fn void main() /* #expect: defer1.ll -define void @defer1.test(i32 %0) #0 { +define void @defer1_test(i32 %0) #0 { entry: %eq = icmp eq i32 %0, 1 br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %entry - %1 = call i32 @"std::io.print"(ptr @.str) - %2 = call i32 @"std::io.println"(ptr @.str.1) #1 + %1 = call i32 @std_io_print(ptr @.str) + %2 = call i32 @std_io_println(ptr @.str.1) #1 ret void if.exit: ; preds = %entry @@ -38,24 +38,24 @@ if.exit: ; preds = %entry br i1 %eq1, label %if.then2, label %if.exit3 if.then2: ; preds = %if.exit - %3 = call i32 @"std::io.print"(ptr @.str.2) - %4 = call i32 @"std::io.print"(ptr @.str.3) - %5 = call i32 @"std::io.println"(ptr @.str.4) #1 + %3 = call i32 @std_io_print(ptr @.str.2) + %4 = call i32 @std_io_print(ptr @.str.3) + %5 = call i32 @std_io_println(ptr @.str.4) #1 ret void if.exit3: ; preds = %if.exit - %6 = call i32 @"std::io.print"(ptr @.str.5) - %7 = call i32 @"std::io.print"(ptr @.str.6) - %8 = call i32 @"std::io.print"(ptr @.str.7) - %9 = call i32 @"std::io.println"(ptr @.str.8) #1 + %6 = call i32 @std_io_print(ptr @.str.5) + %7 = call i32 @std_io_print(ptr @.str.6) + %8 = call i32 @std_io_print(ptr @.str.7) + %9 = call i32 @std_io_println(ptr @.str.8) #1 ret void } ; Function Attrs: nounwind -define void @defer1.main() #0 { +define void @defer1_main() #0 { entry: - call void @defer1.test(i32 1) - call void @defer1.test(i32 0) - call void @defer1.test(i32 10) + call void @defer1_test(i32 1) + call void @defer1_test(i32 0) + call void @defer1_test(i32 10) ret void } diff --git a/test/test_suite2/from_docs/examples_forswitch.c3t b/test/test_suite2/from_docs/examples_forswitch.c3t index 21fad4b84..b9feafa0c 100644 --- a/test/test_suite2/from_docs/examples_forswitch.c3t +++ b/test/test_suite2/from_docs/examples_forswitch.c3t @@ -89,8 +89,7 @@ fn void demo_enum(Height h) } /* #expect: examples.ll - -define void @examples.example_for() #0 { +define void @examples_example_for() #0 { entry: %i = alloca i32, align 4 store i32 0, ptr %i, align 4 @@ -110,7 +109,7 @@ loop.body: ; preds = %loop.cond br label %loop.cond loop.exit: ; preds = %loop.cond - call void @"std::core::builtin.panic"(ptr @.zstr, ptr @.zstr.1, ptr @.zstr.2, i32 14) + call void @std_core_builtin_panic(ptr @.zstr, ptr @.zstr.1, ptr @.zstr.2, i32 14) unreachable unreachable_block: ; No predecessors! @@ -118,7 +117,7 @@ unreachable_block: ; No predecessors! } ; Function Attrs: nounwind -define void @examples.demo_enum(i32 %0) #0 { +define void @examples_demo_enum(i32 %0) #0 { entry: %switch = alloca i32, align 4 %switch2 = alloca i32, align 4 @@ -139,11 +138,11 @@ switch.entry: ; preds = %entry ] switch.case: ; preds = %switch.entry, %switch.entry - %2 = call i32 @"std::io.println"(ptr @.str.3) #1 + %2 = call i32 @std_io_println(ptr @.str.3) #1 br label %switch.exit switch.case1: ; preds = %switch.entry - %3 = call i32 @"std::io.println"(ptr @.str.4) #1 + %3 = call i32 @std_io_println(ptr @.str.4) #1 br label %switch.exit switch.exit: ; preds = %switch.case1, %switch.case, %switch.entry @@ -159,11 +158,11 @@ switch.entry3: ; preds = %switch.exit ] switch.case4: ; preds = %switch.entry3, %switch.entry3 - %5 = call i32 @"std::io.println"(ptr @.str.5) #1 + %5 = call i32 @std_io_println(ptr @.str.5) #1 br label %switch.exit6 switch.case5: ; preds = %switch.entry3 - %6 = call i32 @"std::io.println"(ptr @.str.6) #1 + %6 = call i32 @std_io_println(ptr @.str.6) #1 br label %switch.exit6 switch.exit6: ; preds = %switch.case5, %switch.case4, %switch.entry3 @@ -182,7 +181,7 @@ switch.case9: ; preds = %switch.entry8 br label %switch.exit12 switch.case10: ; preds = %switch.entry8 - %8 = call i32 @"std::io.println"(ptr @.str.7) #1 + %8 = call i32 @std_io_println(ptr @.str.7) #1 br label %switch.exit12 switch.case11: ; preds = %switch.entry8 @@ -220,16 +219,16 @@ switch.entry18: ; preds = %switch.exit16 switch.case19: ; preds = %switch.entry18 store i32 1, ptr %a, align 4 - %11 = call i32 @"std::io.println"(ptr @.str.8) #1 + %11 = call i32 @std_io_println(ptr @.str.8) #1 br label %switch.case20 switch.case20: ; preds = %switch.entry18, %switch.case19 store i32 2, ptr %a21, align 4 - %12 = call i32 @"std::io.println"(ptr @.str.9) #1 + %12 = call i32 @std_io_println(ptr @.str.9) #1 br label %switch.case22 switch.case22: ; preds = %switch.entry18, %switch.case20 - %13 = call i32 @"std::io.println"(ptr @.str.10) #1 + %13 = call i32 @std_io_println(ptr @.str.10) #1 br label %switch.exit23 switch.exit23: ; preds = %switch.case22, %switch.entry18 diff --git a/test/test_suite2/from_docs/examples_functionpointer.c3t b/test/test_suite2/from_docs/examples_functionpointer.c3t index 8b36b2134..cbdc50894 100644 --- a/test/test_suite2/from_docs/examples_functionpointer.c3t +++ b/test/test_suite2/from_docs/examples_functionpointer.c3t @@ -19,15 +19,15 @@ fn void main() /* #expect: demo.ll -define i32 @demo.my_callback(ptr %0, i32 %1) #0 { +define i32 @demo_my_callback(ptr %0, i32 %1) #0 { entry: ret i32 0 } -define void @demo.main() #0 { +define void @demo_main() #0 { entry: %result = alloca i32, align 4 - %0 = load ptr, ptr @demo.cb, align 8 + %0 = load ptr, ptr @demo_cb, align 8 %1 = call i32 %0(ptr @.str, i32 123) store i32 %1, ptr %result, align 4 ret void diff --git a/test/test_suite2/from_docs/examples_if_catch.c3t b/test/test_suite2/from_docs/examples_if_catch.c3t index 893fd1ac6..d1800b3cf 100644 --- a/test/test_suite2/from_docs/examples_if_catch.c3t +++ b/test/test_suite2/from_docs/examples_if_catch.c3t @@ -46,15 +46,14 @@ fn void main() /* #expect: demo.ll - -define i64 @demo.divide(ptr %0, i32 %1, i32 %2) #0 { +define i64 @demo_divide(ptr %0, i32 %1, i32 %2) #0 { entry: %reterr = alloca i64, align 8 %eq = icmp eq i32 %2, 0 br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %entry - ret i64 ptrtoint (ptr @demo.MathError.DIVISION_BY_ZERO to i64) + ret i64 ptrtoint (ptr @"demo_MathError$DIVISION_BY_ZERO" to i64) if.exit: ; preds = %entry %sifp = sitofp i32 %1 to double @@ -64,14 +63,14 @@ if.exit: ; preds = %entry ret i64 0 } -define i64 @demo.testMayError() #0 { +define i64 @demo_testMayError() #0 { entry: %error_var = alloca i64, align 8 %retparam = alloca double, align 8 %reterr = alloca i64, align 8 - %0 = call i32 @demo.foo() - %1 = call i32 @demo.bar() - %2 = call i64 @demo.divide(ptr %retparam, i32 %0, i32 %1) + %0 = call i32 @demo_foo() + %1 = call i32 @demo_bar() + %2 = call i64 @demo_divide(ptr %retparam, i32 %0, i32 %1) %not_err = icmp eq i64 %2, 0 br i1 %not_err, label %after.errcheck, label %error @@ -90,16 +89,16 @@ noerr_block: ; preds = %after.errcheck ret i64 0 } -define void @demo.main() #0 { +define void @demo_main() #0 { entry: %ratio = alloca double, align 8 %ratio.f = alloca i64, align 8 %retparam = alloca double, align 8 %err = alloca i64, align 8 %switch = alloca i64, align 8 - %0 = call i32 @demo.foo() - %1 = call i32 @demo.bar() - %2 = call i64 @demo.divide(ptr %retparam, i32 %0, i32 %1) + %0 = call i32 @demo_foo() + %1 = call i32 @demo_bar() + %2 = call i64 @demo_divide(ptr %retparam, i32 %0, i32 %1) %not_err = icmp eq i64 %2, 0 br i1 %not_err, label %after.errcheck, label %error @@ -140,7 +139,7 @@ if.then: ; preds = %end_block switch.entry: ; preds = %if.then %6 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @demo.MathError.DIVISION_BY_ZERO to i64), %6 + %eq = icmp eq i64 ptrtoint (ptr @"demo_MathError$DIVISION_BY_ZERO" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry diff --git a/test/test_suite2/from_docs/examples_macro_function.c3t b/test/test_suite2/from_docs/examples_macro_function.c3t index 860ed506b..20cd4ae5c 100644 --- a/test/test_suite2/from_docs/examples_macro_function.c3t +++ b/test/test_suite2/from_docs/examples_macro_function.c3t @@ -23,13 +23,13 @@ fn int test() /* #expect: example.ll -define i32 @example.square(i32 %0) #0 { +define i32 @example_square(i32 %0) #0 { entry: %mul = mul i32 %0, %0 ret i32 %mul } -define i32 @example.test() #0 { +define i32 @example_test() #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 @@ -37,7 +37,7 @@ entry: %b2 = alloca i32, align 4 store i32 2, ptr %a, align 4 store i32 3, ptr %b, align 4 - store ptr @example.square, ptr %a1, align 8 + store ptr @example_square, ptr %a1, align 8 store i32 2, ptr %b2, align 4 %0 = load ptr, ptr %a1, align 8 %1 = load i32, ptr %b2, align 4 diff --git a/test/test_suite2/functions/assorted_tests.c3t b/test/test_suite2/functions/assorted_tests.c3t index 2efdb1bb6..a5f4b0a7b 100644 --- a/test/test_suite2/functions/assorted_tests.c3t +++ b/test/test_suite2/functions/assorted_tests.c3t @@ -51,7 +51,7 @@ fn void denormalize(InternalFPF* ptr) /* #expect: test.ll -define i32 @test.foo1() #0 { +define i32 @test_foo1() #0 { entry: %pp = alloca ptr, align 8 %w_cnt = alloca i32, align 4 @@ -65,7 +65,7 @@ entry: ret i32 %3 } -define void @test.foo2(i32 %0) #0 { +define void @test_foo2(i32 %0) #0 { entry: %intbool = icmp ne i32 %0, 0 %ternary = select i1 %intbool, double 1.000000e+00, double 1.250000e+01 @@ -73,7 +73,7 @@ entry: ret void } -define i32 @test.trys(ptr %0, i32 %1) #0 { +define i32 @test_trys(ptr %0, i32 %1) #0 { entry: %asa = alloca i32, align 4 %val = alloca double, align 8 @@ -96,15 +96,15 @@ if.exit: ; preds = %if.then, %entry ret i32 %add1 } -define void @test.setInternalFPFZero(ptr %0) #1 { +define void @test_setInternalFPFZero(ptr %0) #1 { entry: %1 = getelementptr inbounds %InternalFPF, ptr %0, i32 0, i32 0 store i8 0, ptr %1, align 8 ret void } -define void @test.denormalize(ptr %0) #0 { +define void @test_denormalize(ptr %0) #0 { entry: - call void @test.setInternalFPFZero(ptr %0) + call void @test_setInternalFPFZero(ptr %0) ret void } diff --git a/test/test_suite2/functions/naked_function.c3t b/test/test_suite2/functions/naked_function.c3t index d5bde17d6..86580849e 100644 --- a/test/test_suite2/functions/naked_function.c3t +++ b/test/test_suite2/functions/naked_function.c3t @@ -7,7 +7,7 @@ fn void test(int i) @naked // #expect: naked_function.ll -define void @naked_function.test(i32 %0) #0 { +define void @naked_function_test(i32 %0) #0 { entry: ret void } diff --git a/test/test_suite2/functions/returning_void.c3t b/test/test_suite2/functions/returning_void.c3t index e93e09790..6b6d3bd50 100644 --- a/test/test_suite2/functions/returning_void.c3t +++ b/test/test_suite2/functions/returning_void.c3t @@ -16,5 +16,5 @@ if.then: ret void if.exit: - call void @returning_void.test1() + call void @returning_void_test1() ret void diff --git a/test/test_suite2/functions/splat_aarch64.c3t b/test/test_suite2/functions/splat_aarch64.c3t index a61883997..a78eb99c4 100644 --- a/test/test_suite2/functions/splat_aarch64.c3t +++ b/test/test_suite2/functions/splat_aarch64.c3t @@ -20,7 +20,7 @@ fn void test() declare i32 @sum_us([2 x i64]) #0 -define void @splat.test() #0 { +define void @splat_test() #0 { entry: %vararg = alloca %"int[]", align 8 %varargslots = alloca [3 x i32], align 4 diff --git a/test/test_suite2/functions/splat_mingw.c3t b/test/test_suite2/functions/splat_mingw.c3t index 3323662fc..7c0d91360 100644 --- a/test/test_suite2/functions/splat_mingw.c3t +++ b/test/test_suite2/functions/splat_mingw.c3t @@ -15,7 +15,7 @@ fn void test() /* #expect: splat.ll -define void @splat.test() #0 { +define void @splat_test() #0 { entry: %vararg = alloca %"int[]", align 8 %varargslots = alloca [3 x i32], align 4 diff --git a/test/test_suite2/functions/static_vars.c3t b/test/test_suite2/functions/static_vars.c3t index 2bf713c6a..ac7205f65 100644 --- a/test/test_suite2/functions/static_vars.c3t +++ b/test/test_suite2/functions/static_vars.c3t @@ -8,15 +8,16 @@ fn int test() return x; } -// #expect: foo.ll +/* #expect: foo.ll -@test.x = internal unnamed_addr global i32 1, align 4 -@test.y = internal thread_local(localdynamic) unnamed_addr global i32 2, align 4 +@"test$x" = internal unnamed_addr global i32 1, align 4 +@"test$y" = internal thread_local(localdynamic) unnamed_addr global i32 2, align 4 -define i32 @foo.test() - - %0 = load i32, ptr @test.x, align 4 +define i32 @foo_test() #0 { +entry: + %0 = load i32, ptr @"test$x", align 4 %add = add i32 %0, 1 - store i32 %add, ptr @test.x, align 4 - %1 = load i32, ptr @test.x, align 4 + store i32 %add, ptr @"test$x", align 4 + %1 = load i32, ptr @"test$x", align 4 ret i32 %1 +} diff --git a/test/test_suite2/functions/test_regression.c3t b/test/test_suite2/functions/test_regression.c3t index e2579ad87..1aea53bea 100644 --- a/test/test_suite2/functions/test_regression.c3t +++ b/test/test_suite2/functions/test_regression.c3t @@ -243,14 +243,16 @@ fn Type getValue(Blob blob) %List = type { i64, i64, ptr } %Foo = type { i32, i32 } -@.typeid.test.Bobo = linkonce constant { i8, i64 } { i8 10, i64 6 }, align 8 -@.typeid.test.Blob = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@.typeid.test.Foor = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.test.Foo2 = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@.typeid.test.MyEnum = linkonce constant { i8, i64, i64 } { i8 8, i64 3, i64 0 }, align 8 +@"ct$test_Bobo" = linkonce constant %.introspect { i8 10, i64 20, i64 0, i64 6, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Blob" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foor" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foo2" = linkonce constant %.introspect { i8 10, i64 4, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$test_MyEnum" = linkonce constant %.introspect { i8 8, i64 4, i64 ptrtoint (ptr @"ct$int" to i64), i64 3, [0 x i64] zeroinitializer }, align 8 +@"test_static$x" = internal unnamed_addr global i32 1, align 4 -define void @test.Foo2__printme(ptr %0) #0 { +define void @test_Foo2_printme(ptr %0) #0 { entry: %1 = getelementptr inbounds %Foo2, ptr %0, i32 0, i32 0 %2 = load i32, ptr %1, align 8 @@ -259,7 +261,7 @@ entry: } ; Function Attrs: nounwind -define i32 @test.Foo2__mutate(ptr %0) #0 { +define i32 @test_Foo2_mutate(ptr %0) #0 { entry: %1 = call i32 (ptr, ...) @printf(ptr @.str.22) %2 = getelementptr inbounds %Foo2, ptr %0, i32 0, i32 0 @@ -273,26 +275,26 @@ entry: declare i32 @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @test.helloWorld() #0 { +define void @test_helloWorld() #0 { entry: %0 = call i32 (ptr, ...) @printf(ptr @.str) ret void } ; Function Attrs: nounwind -define i32 @test.test_static() #0 { +define i32 @test_test_static() #0 { entry: - %0 = load i32, ptr @test_static.x, align 4 + %0 = load i32, ptr @"test_static$x", align 4 %add = add i32 %0, 1 - store i32 %add, ptr @test_static.x, align 4 - %1 = load i32, ptr @test_static.x, align 4 + store i32 %add, ptr @"test_static$x", align 4 + %1 = load i32, ptr @"test_static$x", align 4 %2 = call i32 (ptr, ...) @printf(ptr @.str.1, i32 %1) - %3 = load i32, ptr @test_static.x, align 4 + %3 = load i32, ptr @"test_static$x", align 4 ret i32 %3 } ; Function Attrs: nounwind -define i32 @test.helo(double %0, ptr byval(%Bobo) align 8 %1) #0 { +define i32 @test_helo(double %0, ptr byval(%Bobo) align 8 %1) #0 { entry: %b = alloca %Bobo, align 4 %de = alloca [3 x i32], align 4 @@ -302,12 +304,12 @@ entry: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %de, ptr align 4 @.__const, i32 12, i1 false) call void @llvm.memcpy.p0.p0.i32(ptr align 4 %c, ptr align 4 %b, i32 20, i1 false) call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg, ptr align 4 %c, i32 20, i1 false) - %2 = call i32 @test.helo(double 1.000000e+00, ptr byval(%Bobo) align 8 %indirectarg) + %2 = call i32 @test_helo(double 1.000000e+00, ptr byval(%Bobo) align 8 %indirectarg) ret i32 1 } ; Function Attrs: nounwind -define i32 @test.test1(i32 %0, i32 %1) #0 { +define i32 @test_test1(i32 %0, i32 %1) #0 { entry: %a = alloca i32, align 4 store i32 %0, ptr %a, align 4 @@ -327,7 +329,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sum_us(ptr %0, i64 %1) #0 { +define i32 @test_sum_us(ptr %0, i64 %1) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -368,7 +370,7 @@ if.exit: ; preds = %entry %lo = load ptr, ptr %18, align 8 %19 = getelementptr inbounds { ptr, i64 }, ptr %taddr, i32 0, i32 1 %hi = load i64, ptr %19, align 8 - %20 = call i32 @test.sum_us(ptr %lo, i64 %hi) + %20 = call i32 @test_sum_us(ptr %lo, i64 %hi) %add = add i32 %9, %20 %add2 = add i32 %6, %add store i32 %add2, ptr %sum, align 4 @@ -377,7 +379,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sumd(ptr %0, i64 %1) #0 { +define i32 @test_sumd(ptr %0, i64 %1) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -421,7 +423,7 @@ loop.exit: ; preds = %loop.cond } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %list = alloca %LinkedList, align 8 %i = alloca i32, align 4 @@ -446,20 +448,20 @@ entry: %vararg23 = alloca %"int[]", align 8 %a1 = alloca ptr, align 8 %b2 = alloca ptr, align 8 - %0 = call i32 @test.test_static() - %1 = call i32 @test.test_static() - %2 = call i32 @test.test_static() - call void @hello_world.hello() + %0 = call i32 @test_test_static() + %1 = call i32 @test_test_static() + %2 = call i32 @test_test_static() + call void @hello_world_hello() call void @llvm.memset.p0.i64(ptr align 8 %list, i8 0, i64 24, i1 false) - call void @"std::array::linkedlist.int.LinkedList__push"(ptr %list, i32 10) - call void @"std::array::linkedlist.int.LinkedList__push"(ptr %list, i32 15) - call void @"std::array::linkedlist.int.LinkedList__push"(ptr %list, i32 30) + call void @"std_array_linkedlist$$int_LinkedList_push"(ptr %list, i32 10) + call void @"std_array_linkedlist$$int_LinkedList_push"(ptr %list, i32 15) + call void @"std_array_linkedlist$$int_LinkedList_push"(ptr %list, i32 30) store i32 0, ptr %i, align 4 br label %loop.cond loop.cond: ; preds = %loop.body, %entry %3 = load i32, ptr %i, align 4 - %4 = call i64 @"std::array::linkedlist.int.LinkedList__len"(ptr %list) #3 + %4 = call i64 @"std_array_linkedlist$$int_LinkedList_len"(ptr %list) #3 %uisitrunc = trunc i64 %4 to i32 %lt = icmp slt i32 %3, %uisitrunc br i1 %lt, label %loop.body, label %loop.exit @@ -468,7 +470,7 @@ loop.body: ; preds = %loop.cond %5 = load i32, ptr %i, align 4 %6 = load i32, ptr %i, align 4 %siuiext = sext i32 %6 to i64 - %7 = call i32 @"std::array::linkedlist.int.LinkedList__get"(ptr %list, i64 %siuiext) + %7 = call i32 @"std_array_linkedlist$$int_LinkedList_get"(ptr %list, i64 %siuiext) %8 = call i32 (ptr, ...) @printf(ptr @.str.2, i32 %5, i32 %7) %9 = load i32, ptr %i, align 4 %add = add i32 %9, 1 @@ -476,22 +478,22 @@ loop.body: ; preds = %loop.cond br label %loop.cond loop.exit: ; preds = %loop.cond - call void @"std::array::linkedlist.int.LinkedList__free"(ptr %list) + call void @"std_array_linkedlist$$int_LinkedList_free"(ptr %list) %10 = call i32 (ptr, ...) @printf(ptr @.str.3, i32 3) store i32 3, ptr %elements, align 4 %11 = call i32 (ptr, ...) @printf(ptr @.str.4) call void @llvm.memset.p0.i64(ptr align 8 %array, i8 0, i64 24, i1 false) - call void @"std::array::list.int.List__append"(ptr %array, i32 100) - call void @"std::array::list.int.List__append"(ptr %array, i32 200) - call void @"std::array::list.int.List__append"(ptr %array, i32 400) - call void @"std::array::list.int.List__push"(ptr %array, i32 600) #3 - call void @"std::array::list.int.List__insertAt"(ptr %array, i64 2, i32 300) + call void @"std_array_list$$int_List_append"(ptr %array, i32 100) + call void @"std_array_list$$int_List_append"(ptr %array, i32 200) + call void @"std_array_list$$int_List_append"(ptr %array, i32 400) + call void @"std_array_list$$int_List_push"(ptr %array, i32 600) #3 + call void @"std_array_list$$int_List_insertAt"(ptr %array, i64 2, i32 300) store i32 0, ptr %i1, align 4 br label %loop.cond2 loop.cond2: ; preds = %loop.body5, %loop.exit %12 = load i32, ptr %i1, align 4 - %13 = call i64 @"std::array::list.int.List__len"(ptr %array) + %13 = call i64 @"std_array_list$$int_List_len"(ptr %array) %uisitrunc3 = trunc i64 %13 to i32 %lt4 = icmp slt i32 %12, %uisitrunc3 br i1 %lt4, label %loop.body5, label %loop.exit8 @@ -500,7 +502,7 @@ loop.body5: ; preds = %loop.cond2 %14 = load i32, ptr %i1, align 4 %15 = load i32, ptr %i1, align 4 %siuiext6 = sext i32 %15 to i64 - %16 = call i32 @"std::array::list.int.List__get"(ptr %array, i64 %siuiext6) + %16 = call i32 @"std_array_list$$int_List_get"(ptr %array, i64 %siuiext6) %17 = call i32 (ptr, ...) @printf(ptr @.str.5, i32 %14, i32 %16) %18 = load i32, ptr %i1, align 4 %add7 = add i32 %18, 1 @@ -508,23 +510,23 @@ loop.body5: ; preds = %loop.cond2 br label %loop.cond2 loop.exit8: ; preds = %loop.cond2 - call void @"std::array::list.int.List__free"(ptr %array) + call void @"std_array_list$$int_List_free"(ptr %array) call void @llvm.memcpy.p0.p0.i32(ptr align 4 %a, ptr align 4 @.__const.6, i32 4, i1 false) call void @llvm.memcpy.p0.p0.i32(ptr align 8 %b, ptr align 8 @.__const.7, i32 8, i1 false) %19 = getelementptr inbounds %Blob, ptr %a, i32 0, i32 0 %20 = load i32, ptr %19, align 4 - %21 = call i32 @test2.int.getValue(i32 %20) + %21 = call i32 @"test2$$int_getValue"(i32 %20) %22 = call i32 (ptr, ...) @printf(ptr @.str.8, i32 %21) %23 = getelementptr inbounds %Blob.0, ptr %b, i32 0, i32 0 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %tempcoerce, ptr align 8 %23, i32 8, i1 false) %24 = load double, ptr %tempcoerce, align 8 - %25 = call double @test2.double.getValue(double %24) + %25 = call double @"test2$$double_getValue"(double %24) %26 = call i32 (ptr, ...) @printf(ptr @.str.9, double %25) - %27 = call i32 @test2.int.getMult(i32 25) + %27 = call i32 @"test2$$int_getMult"(i32 25) %28 = call i32 (ptr, ...) @printf(ptr @.str.10, i32 %27) - %29 = call double @test2.double.getMult(double 3.300000e+00) + %29 = call double @"test2$$double_getMult"(double 3.300000e+00) %30 = call i32 (ptr, ...) @printf(ptr @.str.11, double %29) - call void @test.helloWorld() + call void @test_helloWorld() %31 = getelementptr inbounds %Foo, ptr %ddx, i32 0, i32 0 store i32 0, ptr %31, align 4 %32 = getelementptr inbounds %Foo, ptr %ddx, i32 0, i32 1 @@ -540,7 +542,7 @@ loop.exit8: ; preds = %loop.cond2 %lo = load ptr, ptr %36, align 8 %37 = getelementptr inbounds { ptr, i64 }, ptr %vararg, i32 0, i32 1 %hi = load i64, ptr %37, align 8 - %38 = call i32 @test.sum_us(ptr %lo, i64 %hi) + %38 = call i32 @test_sum_us(ptr %lo, i64 %hi) %39 = call i32 (ptr, ...) @printf(ptr @.str.13, i32 %38) %add9 = add i32 %33, %39 store i32 %add9, ptr %fro, align 4 @@ -558,7 +560,7 @@ loop.exit8: ; preds = %loop.cond2 %lo11 = load ptr, ptr %46, align 8 %47 = getelementptr inbounds { ptr, i64 }, ptr %vararg10, i32 0, i32 1 %hi12 = load i64, ptr %47, align 8 - %48 = call i32 @test.sum_us(ptr %lo11, i64 %hi12) + %48 = call i32 @test_sum_us(ptr %lo11, i64 %hi12) %49 = call i32 (ptr, ...) @printf(ptr @.str.16, i32 %48) %50 = getelementptr inbounds %"int[]", ptr %vararg13, i32 0, i32 1 %51 = getelementptr inbounds %"int[]", ptr %vararg13, i32 0, i32 0 @@ -566,7 +568,7 @@ loop.exit8: ; preds = %loop.cond2 %lo14 = load ptr, ptr %52, align 8 %53 = getelementptr inbounds { ptr, i64 }, ptr %z, i32 0, i32 1 %hi15 = load i64, ptr %53, align 8 - %54 = call i32 @test.sum_us(ptr %lo14, i64 %hi15) + %54 = call i32 @test_sum_us(ptr %lo14, i64 %hi15) %55 = call i32 (ptr, ...) @printf(ptr @.str.17, i32 %54) %56 = getelementptr inbounds [4 x i32], ptr %varargslots, i64 0, i64 0 store i32 1, ptr %56, align 4 @@ -584,7 +586,7 @@ loop.exit8: ; preds = %loop.cond2 %lo17 = load ptr, ptr %62, align 8 %63 = getelementptr inbounds { ptr, i64 }, ptr %vararg16, i32 0, i32 1 %hi18 = load i64, ptr %63, align 8 - %64 = call i32 @test.sum_us(ptr %lo17, i64 %hi18) + %64 = call i32 @test_sum_us(ptr %lo17, i64 %hi18) %65 = call i32 (ptr, ...) @printf(ptr @.str.18, i32 %64) %66 = getelementptr inbounds [1 x i32], ptr %varargslots20, i64 0, i64 0 store i32 1, ptr %66, align 4 @@ -596,7 +598,7 @@ loop.exit8: ; preds = %loop.cond2 %lo21 = load ptr, ptr %69, align 8 %70 = getelementptr inbounds { ptr, i64 }, ptr %vararg19, i32 0, i32 1 %hi22 = load i64, ptr %70, align 8 - %71 = call i32 @test.sum_us(ptr %lo21, i64 %hi22) + %71 = call i32 @test_sum_us(ptr %lo21, i64 %hi22) %72 = call i32 (ptr, ...) @printf(ptr @.str.19, i32 %71) %73 = getelementptr inbounds %"int[]", ptr %vararg23, i32 0, i32 1 store i64 0, ptr %73, align 8 @@ -604,25 +606,24 @@ loop.exit8: ; preds = %loop.cond2 %lo24 = load ptr, ptr %74, align 8 %75 = getelementptr inbounds { ptr, i64 }, ptr %vararg23, i32 0, i32 1 %hi25 = load i64, ptr %75, align 8 - %76 = call i32 @test.sum_us(ptr %lo24, i64 %hi25) + %76 = call i32 @test_sum_us(ptr %lo24, i64 %hi25) %77 = call i32 (ptr, ...) @printf(ptr @.str.20, i32 %76) store ptr null, ptr %a1, align 8 store ptr null, ptr %b2, align 8 ret void } - // #expect: hello_world.ll -define void @hello_world.hello() +define void @hello_world_hello() entry: %0 = call i32 (ptr, ...) @printf(ptr @.str) - %1 = call double @foo.double.check(double 1.110000e+01) + %1 = call double @"foo$$double_check"(double 1.110000e+01) %2 = call i32 (ptr, ...) @printf(ptr @.str.1, double %1) ret void // #expect: foo.double.ll -define double @foo.double.check(double %0) +define double @"foo$$double_check"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul @@ -631,20 +632,20 @@ entry: // #expect: test2.int.ll %Blob = type { i32 } -@test2.int.argh = local_unnamed_addr global i32 234, align 4 +@"test2$$int_argh" = local_unnamed_addr global i32 234, align 4 -define i32 @test2.int.getMult(i32 %0) #0 { +define i32 @"test2$$int_getMult"(i32 %0) #0 { entry: %mul = mul i32 %0, %0 ret i32 %mul } -define i32 @test2.int.hello() #0 { +define i32 @"test2$$int_hello"() #0 { entry: ret i32 1 } -define i32 @test2.int.getValue(i32 %0) #0 { +define i32 @"test2$$int_getValue"(i32 %0) #0 { entry: %blob = alloca %Blob, align 4 %1 = getelementptr inbounds %Blob, ptr %blob, i32 0, i32 0 @@ -657,18 +658,18 @@ entry: // #expect: test2.double.ll %Blob = type { double } -@test2.double.argh = local_unnamed_addr global double 2.340000e+02, align 8 +@"test2$$double_argh" = local_unnamed_addr global double 2.340000e+02, align 8 -define double @test2.double.getMult(double %0) +define double @"test2$$double_getMult"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul -define i32 @test2.double.hello() +define i32 @"test2$$double_hello"() entry: ret i32 1 -define double @test2.double.getValue(double %0) +define double @"test2$$double_getValue"(double %0) entry: %blob = alloca %Blob, align 8 %1 = getelementptr inbounds %Blob, ptr %blob, i32 0, i32 0 diff --git a/test/test_suite2/functions/test_regression_mingw.c3t b/test/test_suite2/functions/test_regression_mingw.c3t index 667128d3e..1141a44ad 100644 --- a/test/test_suite2/functions/test_regression_mingw.c3t +++ b/test/test_suite2/functions/test_regression_mingw.c3t @@ -245,26 +245,29 @@ fn Type getValue(Blob blob) %List = type { i64, i64, ptr } %Foo = type { i32, i32 } -$.typeid.test.Bobo = comdat any +$"ct$test_Bobo" = comdat any -$.typeid.test.Blob = comdat any +$"ct$test_Blob" = comdat any -$.typeid.test.Foor = comdat any +$"ct$test_Foor" = comdat any -$.typeid.test.Foo2 = comdat any +$"ct$test_Foo2" = comdat any -$.typeid.test.Foo = comdat any +$"ct$test_Foo" = comdat any -$.typeid.test.MyEnum = comdat any +$"ct$int" = comdat any -@.typeid.test.Bobo = linkonce constant { i8, i64 } { i8 10, i64 6 }, comdat, align 8 -@.typeid.test.Blob = linkonce constant { i8, i64 } { i8 10, i64 2 }, comdat, align 8 -@.typeid.test.Foor = linkonce constant { i8, i64 } { i8 11, i64 2 }, comdat, align 8 -@.typeid.test.Foo2 = linkonce constant { i8, i64 } { i8 10, i64 1 }, comdat, align 8 -@.typeid.test.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, comdat, align 8 -@.typeid.test.MyEnum = linkonce constant { i8, i64, i64 } { i8 8, i64 3, i64 0 }, comdat, align 8 +$"ct$test_MyEnum" = comdat any + +@"ct$test_Bobo" = linkonce constant %.introspect { i8 10, i64 20, i64 0, i64 6, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Blob" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Foor" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Foo2" = linkonce constant %.introspect { i8 10, i64 4, i64 0, i64 1, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, comdat, align 8 +@"ct$test_MyEnum" = linkonce constant %.introspect { i8 8, i64 4, i64 ptrtoint (ptr @"ct$int" to i64), i64 3, [0 x i64] zeroinitializer }, comdat, align 8 @.str = private unnamed_addr constant [13 x i8] c"helloWorld!\0A\00", align 1 -@test_static.x = internal unnamed_addr global i32 1, align 4 +@"test_static$x" = internal unnamed_addr global i32 1, align 4 @.str.1 = private unnamed_addr constant [16 x i8] c"Test static %d\0A\00", align 1 @.__const = private unnamed_addr constant [3 x i32] [i32 1, i32 2, i32 3], align 4 @.str.2 = private unnamed_addr constant [17 x i8] c"Element[%d]: %d\0A\00", align 1 @@ -290,7 +293,7 @@ $.typeid.test.MyEnum = comdat any @.str.22 = private unnamed_addr constant [9 x i8] c"Mutating\00", align 1 ; Function Attrs: nounwind -define void @test.Foo2__printme(ptr %0) #0 { +define void @test_Foo2_printme(ptr %0) #0 { entry: %1 = getelementptr inbounds %Foo2, ptr %0, i32 0, i32 0 %2 = load i32, ptr %1, align 8 @@ -299,7 +302,7 @@ entry: } ; Function Attrs: nounwind -define i32 @test.Foo2__mutate(ptr %0) #0 { +define i32 @test_Foo2_mutate(ptr %0) #0 { entry: %1 = call i32 (ptr, ...) @printf(ptr @.str.22) %2 = getelementptr inbounds %Foo2, ptr %0, i32 0, i32 0 @@ -313,26 +316,26 @@ entry: declare i32 @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @test.helloWorld() #0 { +define void @test_helloWorld() #0 { entry: %0 = call i32 (ptr, ...) @printf(ptr @.str) ret void } ; Function Attrs: nounwind -define i32 @test.test_static() #0 { +define i32 @test_test_static() #0 { entry: - %0 = load i32, ptr @test_static.x, align 4 + %0 = load i32, ptr @"test_static$x", align 4 %add = add i32 %0, 1 - store i32 %add, ptr @test_static.x, align 4 - %1 = load i32, ptr @test_static.x, align 4 + store i32 %add, ptr @"test_static$x", align 4 + %1 = load i32, ptr @"test_static$x", align 4 %2 = call i32 (ptr, ...) @printf(ptr @.str.1, i32 %1) - %3 = load i32, ptr @test_static.x, align 4 + %3 = load i32, ptr @"test_static$x", align 4 ret i32 %3 } ; Function Attrs: nounwind -define i32 @test.helo(double %0, ptr align 4 %1) #0 { +define i32 @test_helo(double %0, ptr align 4 %1) #0 { entry: %b = alloca %Bobo, align 4 %de = alloca [3 x i32], align 4 @@ -342,12 +345,12 @@ entry: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %de, ptr align 4 @.__const, i32 12, i1 false) call void @llvm.memcpy.p0.p0.i32(ptr align 4 %c, ptr align 4 %b, i32 20, i1 false) call void @llvm.memcpy.p0.p0.i32(ptr align 4 %indirectarg, ptr align 4 %c, i32 20, i1 false) - %2 = call i32 @test.helo(double 1.000000e+00, ptr align 4 %indirectarg) + %2 = call i32 @test_helo(double 1.000000e+00, ptr align 4 %indirectarg) ret i32 1 } ; Function Attrs: nounwind -define i32 @test.test1(i32 %0, i32 %1) #0 { +define i32 @test_test1(i32 %0, i32 %1) #0 { entry: %a = alloca i32, align 4 store i32 %0, ptr %a, align 4 @@ -367,7 +370,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sum_us(ptr align 8 %0) #0 { +define i32 @test_sum_us(ptr align 8 %0) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -401,7 +404,7 @@ if.exit: ; preds = %entry %13 = getelementptr inbounds %"int[]", ptr %vararg, i32 0, i32 1 %14 = getelementptr inbounds %"int[]", ptr %vararg, i32 0, i32 0 store %"int[]" %12, ptr %indirectarg, align 8 - %15 = call i32 @test.sum_us(ptr %indirectarg) + %15 = call i32 @test_sum_us(ptr %indirectarg) %add = add i32 %6, %15 %add2 = add i32 %3, %add store i32 %add2, ptr %sum, align 4 @@ -410,7 +413,7 @@ if.exit: ; preds = %entry } ; Function Attrs: nounwind -define i32 @test.sumd(ptr align 8 %0) #0 { +define i32 @test_sumd(ptr align 8 %0) #0 { entry: %x = alloca %"int[]", align 8 %sum = alloca i32, align 4 @@ -451,7 +454,7 @@ loop.exit: ; preds = %loop.cond } ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %list = alloca %LinkedList, align 8 %i = alloca i32, align 4 @@ -482,20 +485,20 @@ entry: %indirectarg20 = alloca %"int[]", align 8 %a1 = alloca ptr, align 8 %b2 = alloca ptr, align 8 - %0 = call i32 @test.test_static() - %1 = call i32 @test.test_static() - %2 = call i32 @test.test_static() - call void @hello_world.hello() + %0 = call i32 @test_test_static() + %1 = call i32 @test_test_static() + %2 = call i32 @test_test_static() + call void @hello_world_hello() call void @llvm.memset.p0.i64(ptr align 8 %list, i8 0, i64 24, i1 false) - call void @"std::array::linkedlist.int.LinkedList__push"(ptr %list, i32 10) - call void @"std::array::linkedlist.int.LinkedList__push"(ptr %list, i32 15) - call void @"std::array::linkedlist.int.LinkedList__push"(ptr %list, i32 30) + call void @"std_array_linkedlist$$int_LinkedList_push"(ptr %list, i32 10) + call void @"std_array_linkedlist$$int_LinkedList_push"(ptr %list, i32 15) + call void @"std_array_linkedlist$$int_LinkedList_push"(ptr %list, i32 30) store i32 0, ptr %i, align 4 br label %loop.cond loop.cond: ; preds = %loop.body, %entry %3 = load i32, ptr %i, align 4 - %4 = call i64 @"std::array::linkedlist.int.LinkedList__len"(ptr %list) #3 + %4 = call i64 @"std_array_linkedlist$$int_LinkedList_len"(ptr %list) #3 %uisitrunc = trunc i64 %4 to i32 %lt = icmp slt i32 %3, %uisitrunc br i1 %lt, label %loop.body, label %loop.exit @@ -504,7 +507,7 @@ loop.body: ; preds = %loop.cond %5 = load i32, ptr %i, align 4 %6 = load i32, ptr %i, align 4 %siuiext = sext i32 %6 to i64 - %7 = call i32 @"std::array::linkedlist.int.LinkedList__get"(ptr %list, i64 %siuiext) + %7 = call i32 @"std_array_linkedlist$$int_LinkedList_get"(ptr %list, i64 %siuiext) %8 = call i32 (ptr, ...) @printf(ptr @.str.2, i32 %5, i32 %7) %9 = load i32, ptr %i, align 4 %add = add i32 %9, 1 @@ -512,22 +515,22 @@ loop.body: ; preds = %loop.cond br label %loop.cond loop.exit: ; preds = %loop.cond - call void @"std::array::linkedlist.int.LinkedList__free"(ptr %list) + call void @"std_array_linkedlist$$int_LinkedList_free"(ptr %list) %10 = call i32 (ptr, ...) @printf(ptr @.str.3, i32 3) store i32 3, ptr %elements, align 4 %11 = call i32 (ptr, ...) @printf(ptr @.str.4) call void @llvm.memset.p0.i64(ptr align 8 %array, i8 0, i64 24, i1 false) - call void @"std::array::list.int.List__append"(ptr %array, i32 100) - call void @"std::array::list.int.List__append"(ptr %array, i32 200) - call void @"std::array::list.int.List__append"(ptr %array, i32 400) - call void @"std::array::list.int.List__push"(ptr %array, i32 600) #3 - call void @"std::array::list.int.List__insertAt"(ptr %array, i64 2, i32 300) + call void @"std_array_list$$int_List_append"(ptr %array, i32 100) + call void @"std_array_list$$int_List_append"(ptr %array, i32 200) + call void @"std_array_list$$int_List_append"(ptr %array, i32 400) + call void @"std_array_list$$int_List_push"(ptr %array, i32 600) #3 + call void @"std_array_list$$int_List_insertAt"(ptr %array, i64 2, i32 300) store i32 0, ptr %i1, align 4 br label %loop.cond2 loop.cond2: ; preds = %loop.body5, %loop.exit %12 = load i32, ptr %i1, align 4 - %13 = call i64 @"std::array::list.int.List__len"(ptr %array) + %13 = call i64 @"std_array_list$$int_List_len"(ptr %array) %uisitrunc3 = trunc i64 %13 to i32 %lt4 = icmp slt i32 %12, %uisitrunc3 br i1 %lt4, label %loop.body5, label %loop.exit8 @@ -536,7 +539,7 @@ loop.body5: ; preds = %loop.cond2 %14 = load i32, ptr %i1, align 4 %15 = load i32, ptr %i1, align 4 %siuiext6 = sext i32 %15 to i64 - %16 = call i32 @"std::array::list.int.List__get"(ptr %array, i64 %siuiext6) + %16 = call i32 @"std_array_list$$int_List_get"(ptr %array, i64 %siuiext6) %17 = call i32 (ptr, ...) @printf(ptr @.str.5, i32 %14, i32 %16) %18 = load i32, ptr %i1, align 4 %add7 = add i32 %18, 1 @@ -544,23 +547,23 @@ loop.body5: ; preds = %loop.cond2 br label %loop.cond2 loop.exit8: ; preds = %loop.cond2 - call void @"std::array::list.int.List__free"(ptr %array) + call void @"std_array_list$$int_List_free"(ptr %array) call void @llvm.memcpy.p0.p0.i32(ptr align 4 %a, ptr align 4 @.__const.6, i32 4, i1 false) call void @llvm.memcpy.p0.p0.i32(ptr align 8 %b, ptr align 8 @.__const.7, i32 8, i1 false) %19 = getelementptr inbounds %Blob, ptr %a, i32 0, i32 0 %20 = load i32, ptr %19, align 4 - %21 = call i32 @test2.int.getValue(i32 %20) + %21 = call i32 @"test2$$int_getValue"(i32 %20) %22 = call i32 (ptr, ...) @printf(ptr @.str.8, i32 %21) %23 = getelementptr inbounds %Blob.0, ptr %b, i32 0, i32 0 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %tempcoerce, ptr align 8 %23, i32 8, i1 false) %24 = load i64, ptr %tempcoerce, align 8 - %25 = call double @test2.double.getValue(i64 %24) + %25 = call double @"test2$$double_getValue"(i64 %24) %26 = call i32 (ptr, ...) @printf(ptr @.str.9, double %25) - %27 = call i32 @test2.int.getMult(i32 25) + %27 = call i32 @"test2$$int_getMult"(i32 25) %28 = call i32 (ptr, ...) @printf(ptr @.str.10, i32 %27) - %29 = call double @test2.double.getMult(double 3.300000e+00) + %29 = call double @"test2$$double_getMult"(double 3.300000e+00) %30 = call i32 (ptr, ...) @printf(ptr @.str.11, double %29) - call void @test.helloWorld() + call void @test_helloWorld() %31 = getelementptr inbounds %Foo, ptr %ddx, i32 0, i32 0 store i32 0, ptr %31, align 4 %32 = getelementptr inbounds %Foo, ptr %ddx, i32 0, i32 1 @@ -573,7 +576,7 @@ loop.exit8: ; preds = %loop.cond2 store i64 4, ptr %34, align 8 store ptr %x, ptr %35, align 8 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg, ptr align 8 %vararg, i32 16, i1 false) - %36 = call i32 @test.sum_us(ptr %indirectarg) + %36 = call i32 @test_sum_us(ptr %indirectarg) %37 = call i32 (ptr, ...) @printf(ptr @.str.13, i32 %36) %add9 = add i32 %33, %37 store i32 %add9, ptr %fro, align 4 @@ -588,12 +591,12 @@ loop.exit8: ; preds = %loop.cond2 store i64 4, ptr %42, align 8 store ptr %x, ptr %43, align 8 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg11, ptr align 8 %vararg10, i32 16, i1 false) - %44 = call i32 @test.sum_us(ptr %indirectarg11) + %44 = call i32 @test_sum_us(ptr %indirectarg11) %45 = call i32 (ptr, ...) @printf(ptr @.str.16, i32 %44) %46 = getelementptr inbounds %"int[]", ptr %vararg12, i32 0, i32 1 %47 = getelementptr inbounds %"int[]", ptr %vararg12, i32 0, i32 0 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg13, ptr align 8 %z, i32 16, i1 false) - %48 = call i32 @test.sum_us(ptr %indirectarg13) + %48 = call i32 @test_sum_us(ptr %indirectarg13) %49 = call i32 (ptr, ...) @printf(ptr @.str.17, i32 %48) %50 = getelementptr inbounds [4 x i32], ptr %varargslots, i64 0, i64 0 store i32 1, ptr %50, align 4 @@ -608,7 +611,7 @@ loop.exit8: ; preds = %loop.cond2 %55 = getelementptr inbounds %"int[]", ptr %vararg14, i32 0, i32 0 store ptr %varargslots, ptr %55, align 8 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg15, ptr align 8 %vararg14, i32 16, i1 false) - %56 = call i32 @test.sum_us(ptr %indirectarg15) + %56 = call i32 @test_sum_us(ptr %indirectarg15) %57 = call i32 (ptr, ...) @printf(ptr @.str.18, i32 %56) %58 = getelementptr inbounds [1 x i32], ptr %varargslots17, i64 0, i64 0 store i32 1, ptr %58, align 4 @@ -617,12 +620,12 @@ loop.exit8: ; preds = %loop.cond2 %60 = getelementptr inbounds %"int[]", ptr %vararg16, i32 0, i32 0 store ptr %varargslots17, ptr %60, align 8 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg18, ptr align 8 %vararg16, i32 16, i1 false) - %61 = call i32 @test.sum_us(ptr %indirectarg18) + %61 = call i32 @test_sum_us(ptr %indirectarg18) %62 = call i32 (ptr, ...) @printf(ptr @.str.19, i32 %61) %63 = getelementptr inbounds %"int[]", ptr %vararg19, i32 0, i32 1 store i64 0, ptr %63, align 8 call void @llvm.memcpy.p0.p0.i32(ptr align 8 %indirectarg20, ptr align 8 %vararg19, i32 16, i1 false) - %64 = call i32 @test.sum_us(ptr %indirectarg20) + %64 = call i32 @test_sum_us(ptr %indirectarg20) %65 = call i32 (ptr, ...) @printf(ptr @.str.20, i32 %64) store ptr null, ptr %a1, align 8 store ptr null, ptr %b2, align 8 @@ -631,50 +634,44 @@ loop.exit8: ; preds = %loop.cond2 declare void @llvm.memcpy.p0.p0.i32(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i32, i1 immarg) #1 -declare void @hello_world.hello() +declare void @hello_world_hello() declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 -declare void @"std::array::linkedlist.int.LinkedList__push"(ptr, i32) +declare void @"std_array_linkedlist$$int_LinkedList_push"(ptr, i32) -declare i64 @"std::array::linkedlist.int.LinkedList__len"(ptr) +declare i64 @"std_array_linkedlist$$int_LinkedList_len"(ptr) -declare i32 @"std::array::linkedlist.int.LinkedList__get"(ptr, i64) +declare i32 @"std_array_linkedlist$$int_LinkedList_get"(ptr, i64) -declare void @"std::array::linkedlist.int.LinkedList__free"(ptr) +declare void @"std_array_linkedlist$$int_LinkedList_free"(ptr) -declare void @"std::array::list.int.List__append"(ptr, i32) +declare void @"std_array_list$$int_List_append"(ptr, i32) -declare void @"std::array::list.int.List__push"(ptr, i32) +declare void @"std_array_list$$int_List_push"(ptr, i32) -declare void @"std::array::list.int.List__insertAt"(ptr, i64, i32) +declare void @"std_array_list$$int_List_insertAt"(ptr, i64, i32) -declare i64 @"std::array::list.int.List__len"(ptr) +declare i64 @"std_array_list$$int_List_len"(ptr) -declare i32 @"std::array::list.int.List__get"(ptr, i64) +declare i32 @"std_array_list$$int_List_get"(ptr, i64) -declare void @"std::array::list.int.List__free"(ptr) +declare double @"test2$$double_getMult"(double) -declare i32 @test2.int.getValue(i32) - -declare double @test2.double.getValue(i64) - -declare i32 @test2.int.getMult(i32) - -declare double @test2.double.getMult(double) // #expect: hello_world.ll -define void @hello_world.hello() +define void @hello_world_hello() #0 { entry: %0 = call i32 (ptr, ...) @printf(ptr @.str) - %1 = call double @foo.double.check(double 1.110000e+01) + %1 = call double @"foo$$double_check"(double 1.110000e+01) %2 = call i32 (ptr, ...) @printf(ptr @.str.1, double %1) ret void +} // #expect: foo.double.ll -define double @foo.double.check(double %0) +define double @"foo$$double_check"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul @@ -683,19 +680,19 @@ entry: // #expect: test2.int.ll %Blob = type { i32 } -@test2.int.argh = local_unnamed_addr global i32 234, align 4 +@"test2$$int_argh" = local_unnamed_addr global i32 234, align 4 -define i32 @test2.int.getMult(i32 %0) +define i32 @"test2$$int_getMult"(i32 %0) entry: %mul = mul i32 %0, %0 ret i32 %mul -define i32 @test2.int.hello() +define i32 @"test2$$int_hello"() entry: ret i32 1 } -define i32 @test2.int.getValue(i32 %0) +define i32 @"test2$$int_getValue"(i32 %0) entry: %blob = alloca %Blob, align 4 %1 = getelementptr inbounds %Blob, ptr %blob, i32 0, i32 0 @@ -708,19 +705,19 @@ entry: // #expect: test2.double.ll %Blob = type { double } -@test2.double.argh = local_unnamed_addr global double 2.340000e+02, align 8 +@"test2$$double_argh" = local_unnamed_addr global double 2.340000e+02, align 8 -define double @test2.double.getMult(double %0) +define double @"test2$$double_getMult"(double %0) entry: %fmul = fmul double %0, %0 ret double %fmul -define i32 @test2.double.hello() +define i32 @"test2$$double_hello"() entry: ret i32 1 -define double @test2.double.getValue(i64 %0) +define double @"test2$$double_getValue"(i64 %0) entry: %blob = alloca %Blob, align 8 %1 = getelementptr inbounds %Blob, ptr %blob, i32 0, i32 0 diff --git a/test/test_suite2/functions/typeless_varargs.c3t b/test/test_suite2/functions/typeless_varargs.c3t index e15d23870..b830fecbd 100644 --- a/test/test_suite2/functions/typeless_varargs.c3t +++ b/test/test_suite2/functions/typeless_varargs.c3t @@ -22,9 +22,9 @@ fn int main() /* #expect: test.ll -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @test.retest(ptr %0, i64 %1) #0 { +define void @test_retest(ptr %0, i64 %1) #0 { entry: %foo = alloca %"variant[]", align 8 %vararg = alloca %"variant[]", align 8 @@ -38,11 +38,11 @@ entry: %lo = load ptr, ptr %6, align 8 %7 = getelementptr inbounds { ptr, i64 }, ptr %foo, i32 0, i32 1 %hi = load i64, ptr %7, align 8 - call void @test.test(ptr %lo, i64 %hi) + call void @test_test(ptr %lo, i64 %hi) ret void } -define void @test.test(ptr %0, i64 %1) #0 { +define void @test_test(ptr %0, i64 %1) #0 { entry: %foo = alloca %"variant[]", align 8 %2 = getelementptr inbounds { ptr, i64 }, ptr %foo, i32 0, i32 0 @@ -71,7 +71,7 @@ entry: store i32 1, ptr %i, align 4 store i32 1, ptr %taddr, align 4 %0 = insertvalue %variant undef, ptr %taddr, 0 - %1 = insertvalue %variant %0, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %1 = insertvalue %variant %0, i64 ptrtoint (ptr @"ct$int" to i64), 1 %2 = getelementptr inbounds [1 x %variant], ptr %varargslots, i64 0, i64 0 store %variant %1, ptr %2, align 16 %3 = getelementptr inbounds %"variant[]", ptr %vararg, i32 0, i32 1 @@ -82,10 +82,10 @@ entry: %lo = load ptr, ptr %5, align 8 %6 = getelementptr inbounds { ptr, i64 }, ptr %vararg, i32 0, i32 1 %hi = load i64, ptr %6, align 8 - call void @test.test(ptr %lo, i64 %hi) + call void @test_test(ptr %lo, i64 %hi) store i32 1, ptr %taddr3, align 4 %7 = insertvalue %variant undef, ptr %taddr3, 0 - %8 = insertvalue %variant %7, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %8 = insertvalue %variant %7, i64 ptrtoint (ptr @"ct$int" to i64), 1 %9 = getelementptr inbounds [1 x %variant], ptr %varargslots2, i64 0, i64 0 store %variant %8, ptr %9, align 16 %10 = getelementptr inbounds %"variant[]", ptr %vararg1, i32 0, i32 1 @@ -96,6 +96,6 @@ entry: %lo4 = load ptr, ptr %12, align 8 %13 = getelementptr inbounds { ptr, i64 }, ptr %vararg1, i32 0, i32 1 %hi5 = load i64, ptr %13, align 8 - call void @test.retest(ptr %lo4, i64 %hi5) + call void @test_retest(ptr %lo4, i64 %hi5) ret i32 1 } \ No newline at end of file diff --git a/test/test_suite2/functions/varargs.c3t b/test/test_suite2/functions/varargs.c3t index 0db8893de..1147930f1 100644 --- a/test/test_suite2/functions/varargs.c3t +++ b/test/test_suite2/functions/varargs.c3t @@ -17,7 +17,7 @@ fn void test() /* #expect: varargs.ll -define void @varargs.test() #0 { +define void @varargs_test() #0 { entry: %x1 = alloca i8, align 1 %b = alloca i8, align 1 diff --git a/test/test_suite2/generic/generic_idents.c3t b/test/test_suite2/generic/generic_idents.c3t index c957deedd..c39f0ba0e 100644 --- a/test/test_suite2/generic/generic_idents.c3t +++ b/test/test_suite2/generic/generic_idents.c3t @@ -26,15 +26,15 @@ fn double getIt2(double i) return doubleAddMult(i, 2, 3); } -// #expect: gen.int.ll +/* #expect: gen.int.ll -define i32 @gen.int.mult(i32 %0) #0 { +define i32 @"gen$$int_mult"(i32 %0) #0 { entry: %mul = mul i32 %0, %0 ret i32 %mul } -define i32 @gen.int.addMult(i32 %0, i32 %1, i32 %2) #0 { +define i32 @"gen$$int_addMult"(i32 %0, i32 %1, i32 %2) #0 { entry: %mul = mul i32 %0, %1 %add = add i32 %mul, %2 @@ -44,26 +44,26 @@ entry: // #expect: test.ll -define i32 @test.getIt(i32 %0) #0 { +define i32 @test_getIt(i32 %0) #0 { entry: - %1 = call i32 @gen.int.mult(i32 %0) + %1 = call i32 @"gen$$int_mult"(i32 %0) %add = add i32 %1, 1 ret i32 %add } -define double @test.getIt2(double %0) #0 { +define double @test_getIt2(double %0) #0 { entry: - %1 = call double @gen.double.addMult(double %0, double 2.000000e+00, double 3.000000e+00) + %1 = call double @"gen$$double_addMult"(double %0, double 2.000000e+00, double 3.000000e+00) ret double %1 } -declare i32 @gen.int.mult(i32) +declare i32 @"gen$$int_mult"(i32) -declare double @gen.double.addMult(double, double, double) +declare double @"gen$$double_addMult"(double, double, double) // #expect: gen.double.ll -define double @gen.double.addMult(double %0, double %1, double %2) +define double @"gen$$double_addMult"(double %0, double %1, double %2) %fmul = fmul double %0, %1 %fadd = fadd double %fmul, %2 ret double %fadd diff --git a/test/test_suite2/globals/global_align.c3t b/test/test_suite2/globals/global_align.c3t index 67c16ba8f..d53034854 100644 --- a/test/test_suite2/globals/global_align.c3t +++ b/test/test_suite2/globals/global_align.c3t @@ -11,12 +11,12 @@ fn void test() // #expect: abc.ll -@abc.foo = local_unnamed_addr global i32 0, align 32 +@abc_foo = local_unnamed_addr global i32 0, align 32 -define void @abc.test() #0 { +define void @abc_test() #0 { entry: %x = alloca i32, align 4 - %0 = load i32, ptr @abc.foo, align 32 + %0 = load i32, ptr @abc_foo, align 32 store i32 %0, ptr %x, align 4 ret void } diff --git a/test/test_suite2/import/access_other_module.c3t b/test/test_suite2/import/access_other_module.c3t index 1c8d438ed..824309efe 100644 --- a/test/test_suite2/import/access_other_module.c3t +++ b/test/test_suite2/import/access_other_module.c3t @@ -10,15 +10,15 @@ fn void main() /* #expect: foo.ll -@"std::math.DIV_1_SQRT2" = external global double, align 8 +@std_math_DIV_1_SQRT2 = external global double, align 8 -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %foekf = alloca ptr, align 8 %xok = alloca ptr, align 8 - store ptr @"std::math.log", ptr %foekf, align 8 - store ptr @"std::math.DIV_1_SQRT2", ptr %xok, align 8 + store ptr @std_math_log, ptr %foekf, align 8 + store ptr @std_math_DIV_1_SQRT2, ptr %xok, align 8 ret void } -declare double @"std::math.log"(double) \ No newline at end of file +declare double @std_math_log(double) \ No newline at end of file diff --git a/test/test_suite2/initializer_lists/fasta.c3t b/test/test_suite2/initializer_lists/fasta.c3t index aa1e53359..cdbf0d1fc 100644 --- a/test/test_suite2/initializer_lists/fasta.c3t +++ b/test/test_suite2/initializer_lists/fasta.c3t @@ -110,35 +110,35 @@ fn void main(int argc, char **argv) %"char[]" = type { ptr, i64 } %"double[]" = type { ptr, i64 } -@fasta.IM = local_unnamed_addr constant i32 139968, align 4 -@fasta.IA = local_unnamed_addr constant i32 3877, align 4 -@fasta.IC = local_unnamed_addr constant i32 29573, align 4 -@fasta.SEED = local_unnamed_addr constant i32 42, align 4 -@fasta.seed = local_unnamed_addr global i32 42, align 4 +@fasta_IM = local_unnamed_addr constant i32 139968, align 4 +@fasta_IA = local_unnamed_addr constant i32 3877, align 4 +@fasta_IC = local_unnamed_addr constant i32 29573, align 4 +@fasta_SEED = local_unnamed_addr constant i32 42, align 4 +@fasta_seed = local_unnamed_addr global i32 42, align 4 @.str = private unnamed_addr constant [288 x i8] c"GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAATACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCAGCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGGAGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCCAGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA\00", align 1 -@fasta.alu = protected unnamed_addr global %"char[]" { ptr @.str, i64 287 }, align 8 +@fasta_alu = protected unnamed_addr global %"char[]" { ptr @.str, i64 287 }, align 8 @.str.11 = private unnamed_addr constant [16 x i8] c"acgtBDHKMNRSVWY\00", align 1 -@fasta.iub = local_unnamed_addr global %"char[]" { ptr @.str.11, i64 15 }, align 8 +@fasta_iub = local_unnamed_addr global %"char[]" { ptr @.str.11, i64 15 }, align 8 @.taddr = private global [15 x double] [double 2.700000e-01, double 1.200000e-01, double 1.200000e-01, double 2.700000e-01, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02, double 2.000000e-02], align 8 -@fasta.iub_p = local_unnamed_addr global %"double[]" { ptr @.taddr, i64 15 }, align 8 +@fasta_iub_p = local_unnamed_addr global %"double[]" { ptr @.taddr, i64 15 }, align 8 @.str.12 = private unnamed_addr constant [5 x i8] c"acgt\00", align 1 -@fasta.homosapiens = local_unnamed_addr global %"char[]" { ptr @.str.12, i64 4 }, align 8 +@fasta_homosapiens = local_unnamed_addr global %"char[]" { ptr @.str.12, i64 4 }, align 8 @.taddr.13 = private global [4 x double] [double 0x3FD3639D20BAEB5B, double 0x3FC957AE3DCD561B, double 0x3FC9493AEAB6C2BF, double 0x3FD34BEE4B030838], align 8 -@fasta.homosapiens_p = local_unnamed_addr global %"double[]" { ptr @.taddr.13, i64 4 }, align 8 -@fasta.LINELEN = local_unnamed_addr constant i32 60, align 4 +@fasta_homosapiens_p = local_unnamed_addr global %"double[]" { ptr @.taddr.13, i64 4 }, align 8 +@fasta_LINELEN = local_unnamed_addr constant i32 60, align 4 @.str.14 = private unnamed_addr constant [23 x i8] c">ONE Homo sapiens alu\0A\00", align 1 @.str.15 = private unnamed_addr constant [26 x i8] c">TWO IUB ambiguity codes\0A\00", align 1 @.str.16 = private unnamed_addr constant [31 x i8] c">THREE Homo sapiens frequency\0A\00", align 1 ; Function Attrs: nounwind -define float @fasta.fasta_rand(float %0) #0 { +define float @fasta_fasta_rand(float %0) #0 { entry: - %1 = load i32, ptr @fasta.seed, align 4 + %1 = load i32, ptr @fasta_seed, align 4 %mul = mul i32 %1, 3877 %add = add i32 %mul, 29573 %umod = urem i32 %add, 139968 - store i32 %umod, ptr @fasta.seed, align 4 - %2 = load i32, ptr @fasta.seed, align 4 + store i32 %umod, ptr @fasta_seed, align 4 + %2 = load i32, ptr @fasta_seed, align 4 %uifp = uitofp i32 %2 to float %fmul = fmul float %0, %uifp %fdiv = fdiv float %fmul, 1.399680e+05 @@ -155,7 +155,7 @@ declare i32 @printf(ptr, ...) #0 declare void @putchar(i32) #0 ; Function Attrs: nounwind -define void @fasta.repeat_fasta(ptr %0, i64 %1, i32 %2) #0 { +define void @fasta_repeat_fasta(ptr %0, i64 %1, i32 %2) #0 { entry: %seq = alloca %"char[]", align 8 %len = alloca i64, align 8 @@ -216,7 +216,7 @@ if.exit4: ; preds = %if.then3, %loop.exi } ; Function Attrs: nounwind -define void @fasta.random_fasta(ptr %0, i64 %1, ptr %2, i64 %3, i32 %4) #0 { +define void @fasta_random_fasta(ptr %0, i64 %1, ptr %2, i64 %3, i32 %4) #0 { entry: %symb = alloca %"char[]", align 8 %probability = alloca %"double[]", align 8 @@ -251,7 +251,7 @@ loop.cond: ; preds = %if.exit9, %entry br i1 %lt, label %loop.body, label %loop.exit11 loop.body: ; preds = %loop.cond - %16 = call float @fasta.fasta_rand(float 1.000000e+00) + %16 = call float @fasta_fasta_rand(float 1.000000e+00) %fpfpext = fpext float %16 to double store double %fpfpext, ptr %v, align 8 store i32 0, ptr %j, align 4 @@ -326,7 +326,7 @@ if.exit14: ; preds = %if.then13, %loop.ex } ; Function Attrs: nounwind -define void @fasta.main(i32 %0, ptr %1) #0 { +define void @fasta_main(i32 %0, ptr %1) #0 { entry: %n = alloca i32, align 4 store i32 1000, ptr %n, align 4 @@ -342,32 +342,32 @@ if.then: ; preds = %entry if.exit: ; preds = %if.then, %entry %4 = call i32 (ptr, ...) @printf(ptr @.str.14) - %lo = load ptr, ptr @fasta.alu, align 8 - %hi = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta.alu, i32 0, i32 1), align 8 + %lo = load ptr, ptr @fasta_alu, align 8 + %hi = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta_alu, i32 0, i32 1), align 8 %5 = load i32, ptr %n, align 4 %mul = mul i32 %5, 2 - call void @fasta.repeat_fasta(ptr %lo, i64 %hi, i32 %mul) + call void @fasta_repeat_fasta(ptr %lo, i64 %hi, i32 %mul) %6 = call i32 (ptr, ...) @printf(ptr @.str.15) - %lo1 = load ptr, ptr @fasta.iub, align 8 - %hi2 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta.iub, i32 0, i32 1), align 8 - %lo3 = load ptr, ptr @fasta.iub_p, align 8 - %hi4 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta.iub_p, i32 0, i32 1), align 8 + %lo1 = load ptr, ptr @fasta_iub, align 8 + %hi2 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta_iub, i32 0, i32 1), align 8 + %lo3 = load ptr, ptr @fasta_iub_p, align 8 + %hi4 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta_iub_p, i32 0, i32 1), align 8 %7 = load i32, ptr %n, align 4 %mul5 = mul i32 %7, 3 - call void @fasta.random_fasta(ptr %lo1, i64 %hi2, ptr %lo3, i64 %hi4, i32 %mul5) + call void @fasta_random_fasta(ptr %lo1, i64 %hi2, ptr %lo3, i64 %hi4, i32 %mul5) %8 = call i32 (ptr, ...) @printf(ptr @.str.16) - %lo6 = load ptr, ptr @fasta.homosapiens, align 8 - %hi7 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta.homosapiens, i32 0, i32 1), align 8 - %lo8 = load ptr, ptr @fasta.homosapiens_p, align 8 - %hi9 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta.homosapiens_p, i32 0, i32 1), align 8 + %lo6 = load ptr, ptr @fasta_homosapiens, align 8 + %hi7 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta_homosapiens, i32 0, i32 1), align 8 + %lo8 = load ptr, ptr @fasta_homosapiens_p, align 8 + %hi9 = load i64, ptr getelementptr inbounds ({ ptr, i64 }, ptr @fasta_homosapiens_p, i32 0, i32 1), align 8 %9 = load i32, ptr %n, align 4 %mul10 = mul i32 %9, 5 - call void @fasta.random_fasta(ptr %lo6, i64 %hi7, ptr %lo8, i64 %hi9, i32 %mul10) + call void @fasta_random_fasta(ptr %lo6, i64 %hi7, ptr %lo8, i64 %hi9, i32 %mul10) ret void } define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @fasta.main(i32 %0, ptr %1) + call void @fasta_main(i32 %0, ptr %1) ret i32 0 } \ No newline at end of file diff --git a/test/test_suite2/initializer_lists/general_tests.c3t b/test/test_suite2/initializer_lists/general_tests.c3t index 53010aede..8945b7924 100644 --- a/test/test_suite2/initializer_lists/general_tests.c3t +++ b/test/test_suite2/initializer_lists/general_tests.c3t @@ -38,14 +38,14 @@ fn int test() %"int[]" = type { ptr, i64 } %"Bar[]" = type { ptr, i64 } -@.typeid.general_tests.Baz = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.general_tests.Bar = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$general_tests_Baz" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$general_tests_Bar" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant { i32, [4 x i8] } { i32 1, [4 x i8] undef }, align 8 -@test.foo1 = internal unnamed_addr global i32 22, align 4 +@"test$foo1" = internal unnamed_addr global i32 22, align 4 @.str = private unnamed_addr constant [7 x i8] c"Hello!\00", align 1 ; Function Attrs: nounwind -define i32 @general_tests.test() #0 { +define i32 @general_tests_test() #0 { entry: %ffe = alloca %Baz, align 8 %azz = alloca [1 x i32], align 4 diff --git a/test/test_suite2/initializer_lists/ranges_to_dynamic.c3t b/test/test_suite2/initializer_lists/ranges_to_dynamic.c3t index f15881256..8942723f4 100644 --- a/test/test_suite2/initializer_lists/ranges_to_dynamic.c3t +++ b/test/test_suite2/initializer_lists/ranges_to_dynamic.c3t @@ -19,7 +19,7 @@ fn void main() /* #expect: test.ll -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %y = alloca [10 x i32], align 16 %anon = alloca i64, align 8 diff --git a/test/test_suite2/initializer_lists/statics.c3t b/test/test_suite2/initializer_lists/statics.c3t index 169e1774b..899956ca0 100644 --- a/test/test_suite2/initializer_lists/statics.c3t +++ b/test/test_suite2/initializer_lists/statics.c3t @@ -35,13 +35,13 @@ fn int main() %Bar = type { i32, i32 } %"Bar[]" = type { ptr, i64 } -@.typeid.statics.Baz = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.statics.Bar = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$statics_Baz" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$statics_Bar" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.taddr = private global [1 x %Bar] [%Bar { i32 1, i32 2 }], align 8 -@test.c = internal unnamed_addr global %"Bar[]" { ptr @.taddr, i64 1 }, align 8 +@"test$c" = internal unnamed_addr global %"Bar[]" { ptr @.taddr, i64 1 }, align 8 @.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 -define void @statics.test() #0 { +define void @statics_test() #0 { entry: %b = alloca %"Bar[]", align 8 %literal = alloca [1 x %Bar], align 4 @@ -58,7 +58,7 @@ entry: %ptroffset = getelementptr inbounds %Bar, ptr %6, i64 0 %7 = getelementptr inbounds %Bar, ptr %ptroffset, i32 0, i32 1 %8 = load i32, ptr %7, align 4 - %9 = load ptr, ptr @test.c, align 8 + %9 = load ptr, ptr @"test$c", align 8 %ptroffset1 = getelementptr inbounds %Bar, ptr %9, i64 0 %10 = getelementptr inbounds %Bar, ptr %ptroffset1, i32 0, i32 1 %11 = load i32, ptr %10, align 4 @@ -70,7 +70,7 @@ entry: %16 = load i32, ptr %15, align 4 %add = add i32 %16, 1 store i32 %add, ptr %15, align 4 - %17 = load ptr, ptr @test.c, align 8 + %17 = load ptr, ptr @"test$c", align 8 %ptroffset3 = getelementptr inbounds %Bar, ptr %17, i64 0 %18 = getelementptr inbounds %Bar, ptr %ptroffset3, i32 0, i32 1 %19 = load i32, ptr %18, align 4 @@ -81,9 +81,9 @@ entry: define i32 @main() #0 { entry: - call void @statics.test() - call void @statics.test() - call void @statics.test() + call void @statics_test() + call void @statics_test() + call void @statics_test() ret i32 1 } diff --git a/test/test_suite2/initializer_lists/subarrays.c3t b/test/test_suite2/initializer_lists/subarrays.c3t index f28dca9ba..dabe00d09 100644 --- a/test/test_suite2/initializer_lists/subarrays.c3t +++ b/test/test_suite2/initializer_lists/subarrays.c3t @@ -51,14 +51,14 @@ fn int main() %"int[]" = type { ptr, i64 } %Baz = type { double } -@.typeid.subarrays.Baz = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.subarrays.Bar = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$subarrays_Baz" = linkonce constant %.introspect { i8 11, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$subarrays_Bar" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.taddr = private global [2 x %Bar] [%Bar { i32 3, i32 4 }, %Bar { i32 8, i32 9 }], align 8 -@subarrays.arrbar = local_unnamed_addr global %"Bar[]" { ptr @.taddr, i64 2 }, align 8 +@subarrays_arrbar = local_unnamed_addr global %"Bar[]" { ptr @.taddr, i64 2 }, align 8 @.taddr.3 = private global [2 x i32] [i32 1, i32 2], align 4 -@subarrays.xd = local_unnamed_addr global %"int[]" { ptr @.taddr.3, i64 2 }, align 8 +@subarrays_xd = local_unnamed_addr global %"int[]" { ptr @.taddr.3, i64 2 }, align 8 @.taddr.4 = private global [2 x i32] [i32 3, i32 4], align 4 -@subarrays.fofeo = local_unnamed_addr global ptr @.taddr.4, align 8 +@subarrays_fofeo = local_unnamed_addr global ptr @.taddr.4, align 8 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.5 = private unnamed_addr constant [7 x i8] c"Start:\00", align 1 @.str.6 = private unnamed_addr constant [26 x i8] c"X len: %d mid element %d\0A\00", align 1 @@ -86,10 +86,10 @@ entry: %foo = alloca %"Bar[]", align 8 %literal9 = alloca [0 x %Bar], align 4 %baz = alloca [3 x %Baz], align 16 - %0 = load ptr, ptr @subarrays.arrbar, align 8 + %0 = load ptr, ptr @subarrays_arrbar, align 8 %ptroffset = getelementptr inbounds %Bar, ptr %0, i64 1 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %w, ptr align 4 %ptroffset, i32 8, i1 false) - %1 = load ptr, ptr @subarrays.arrbar, align 8 + %1 = load ptr, ptr @subarrays_arrbar, align 8 %ptroffset1 = getelementptr inbounds %Bar, ptr %1, i64 1 %2 = getelementptr inbounds %Bar, ptr %ptroffset1, i32 0, i32 0 %3 = load i32, ptr %2, align 4 @@ -110,7 +110,7 @@ entry: %12 = getelementptr inbounds [3 x i32], ptr %literal2, i64 0, i64 2 store i32 567, ptr %12, align 4 store ptr %literal2, ptr %y, align 8 - %13 = call i32 @"std::io.println"(ptr @.str.5) #3 + %13 = call i32 @std_io_println(ptr @.str.5) #3 %14 = getelementptr inbounds %"int[]", ptr %x, i32 0, i32 1 %15 = load i64, ptr %14, align 8 %uisitrunc = trunc i64 %15 to i32 @@ -123,7 +123,7 @@ entry: %ptroffset4 = getelementptr inbounds i32, ptr %20, i64 1 %21 = load i32, ptr %ptroffset4, align 4 %22 = call i32 (ptr, ...) @printf(ptr @.str.7, i32 %21) - %23 = load ptr, ptr @subarrays.fofeo, align 8 + %23 = load ptr, ptr @subarrays_fofeo, align 8 %ptroffset5 = getelementptr inbounds i32, ptr %23, i64 1 %24 = load i32, ptr %ptroffset5, align 4 %25 = call i32 (ptr, ...) @printf(ptr @.str.8, i32 %24) @@ -148,7 +148,7 @@ entry: br i1 %not7, label %if.then, label %if.exit if.then: ; preds = %entry - %36 = call i32 @"std::io.println"(ptr @.str.9) #3 + %36 = call i32 @std_io_println(ptr @.str.9) #3 br label %if.exit if.exit: ; preds = %if.then, %entry diff --git a/test/test_suite2/initializer_lists/zero_init.c3t b/test/test_suite2/initializer_lists/zero_init.c3t index 784a5469b..f59a1f436 100644 --- a/test/test_suite2/initializer_lists/zero_init.c3t +++ b/test/test_suite2/initializer_lists/zero_init.c3t @@ -36,7 +36,7 @@ fn int test() %Bar = type { i32, i32 } %Baz = type { double } -define i32 @zero_init.test() #0 { +define i32 @zero_init_test() #0 { entry: %m = alloca %Mega, align 4 %azz = alloca [1 x i32], align 4 diff --git a/test/test_suite2/literals/literal_general.c3t b/test/test_suite2/literals/literal_general.c3t index 377c6096e..d623f4585 100644 --- a/test/test_suite2/literals/literal_general.c3t +++ b/test/test_suite2/literals/literal_general.c3t @@ -12,11 +12,11 @@ uint foo = '謝'; /* #expect: foo.ll -@foo.aa = local_unnamed_addr global i32 228, align 4 -@foo.x = local_unnamed_addr global i32 1094861636, align 4 -@foo.y = local_unnamed_addr global i32 1214606447, align 4 -@foo.z = local_unnamed_addr global i16 12594, align 2 -@foo.d = local_unnamed_addr global i32 49, align 4 -@foo.b = local_unnamed_addr global i8 64, align 1 -@foo.abc = local_unnamed_addr global i32 322052779, align 4 -@foo.foo = local_unnamed_addr global i32 35613, align 4 +@foo_aa = local_unnamed_addr global i32 228, align 4 +@foo_x = local_unnamed_addr global i32 1094861636, align 4 +@foo_y = local_unnamed_addr global i32 1214606447, align 4 +@foo_z = local_unnamed_addr global i16 12594, align 2 +@foo_d = local_unnamed_addr global i32 49, align 4 +@foo_b = local_unnamed_addr global i8 64, align 1 +@foo_abc = local_unnamed_addr global i32 322052779, align 4 +@foo_foo = local_unnamed_addr global i32 35613, align 4 diff --git a/test/test_suite2/macros/macro_body_defer.c3t b/test/test_suite2/macros/macro_body_defer.c3t index 443295bab..adfdce935 100644 --- a/test/test_suite2/macros/macro_body_defer.c3t +++ b/test/test_suite2/macros/macro_body_defer.c3t @@ -49,14 +49,14 @@ fn void! main() /* #expect: foo.ll -define i64 @foo.foo(ptr %0) #0 { +define i64 @foo_foo(ptr %0) #0 { entry: %reterr = alloca i64, align 8 store i32 1, ptr %0, align 4 ret i64 0 } -define i64 @foo.main() #0 { +define i64 @foo_main() #0 { entry: %i = alloca i32, align 4 %i1 = alloca i32, align 4 @@ -104,7 +104,7 @@ loop.exit4: ; No predecessors! ; Function Attrs: nounwind define i32 @main(i32 %0, ptr %1) #0 { entry: - %2 = call i64 @foo.main() + %2 = call i64 @foo_main() %not_err = icmp eq i64 %2, 0 br i1 %not_err, label %after.errcheck, label %error_block diff --git a/test/test_suite2/macros/macro_common.c3t b/test/test_suite2/macros/macro_common.c3t index 925b08013..e3cbf3ff6 100644 --- a/test/test_suite2/macros/macro_common.c3t +++ b/test/test_suite2/macros/macro_common.c3t @@ -14,7 +14,7 @@ fn void test2() /* #expect: test.ll -define void @test.test2() #0 { +define void @test_test2() #0 { entry: %x = alloca i32, align 4 %blockret = alloca double, align 8 diff --git a/test/test_suite2/macros/macro_defer_exit.c3t b/test/test_suite2/macros/macro_defer_exit.c3t index 207c9ecf8..dac68826c 100644 --- a/test/test_suite2/macros/macro_defer_exit.c3t +++ b/test/test_suite2/macros/macro_defer_exit.c3t @@ -20,7 +20,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %blockret = alloca i32, align 4 diff --git a/test/test_suite2/macros/macro_defer_scope.c3t b/test/test_suite2/macros/macro_defer_scope.c3t index 0fb766794..3e8b4804a 100644 --- a/test/test_suite2/macros/macro_defer_scope.c3t +++ b/test/test_suite2/macros/macro_defer_scope.c3t @@ -18,7 +18,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %blockret = alloca i32, align 4 diff --git a/test/test_suite2/macros/macro_defer_with_body.c3t b/test/test_suite2/macros/macro_defer_with_body.c3t index 17059c5c0..fc1932c92 100644 --- a/test/test_suite2/macros/macro_defer_with_body.c3t +++ b/test/test_suite2/macros/macro_defer_with_body.c3t @@ -21,7 +21,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %a = alloca i32, align 4 diff --git a/test/test_suite2/macros/macro_failable_return_rethrow.c3t b/test/test_suite2/macros/macro_failable_return_rethrow.c3t index dd09de47c..8e5516dd1 100644 --- a/test/test_suite2/macros/macro_failable_return_rethrow.c3t +++ b/test/test_suite2/macros/macro_failable_return_rethrow.c3t @@ -16,13 +16,13 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %error_var = alloca i64, align 8 %blockret = alloca i32, align 4 %error_var1 = alloca i64, align 8 %retparam = alloca i32, align 4 - %0 = call i64 @test.xy(ptr %retparam) + %0 = call i64 @test_xy(ptr %retparam) %not_err = icmp eq i64 %0, 0 br i1 %not_err, label %after.errcheck, label %error diff --git a/test/test_suite2/macros/macro_import_res_private.c3t b/test/test_suite2/macros/macro_import_res_private.c3t index a5f6bce35..95bfa9cd3 100644 --- a/test/test_suite2/macros/macro_import_res_private.c3t +++ b/test/test_suite2/macros/macro_import_res_private.c3t @@ -19,8 +19,8 @@ fn void test() /* #expect: baz.ll -define void @baz.test() #0 { +define void @baz_test() #0 { entry: - call void @foo.foo1() + call void @foo_foo1() ret void } \ No newline at end of file diff --git a/test/test_suite2/macros/macro_nested_labels.c3t b/test/test_suite2/macros/macro_nested_labels.c3t index 28989b76d..42133c4e7 100644 --- a/test/test_suite2/macros/macro_nested_labels.c3t +++ b/test/test_suite2/macros/macro_nested_labels.c3t @@ -28,7 +28,7 @@ fn void main() /* #expect: test.ll -define void @test.main() #0 { +define void @test_main() #0 { entry: %ab = alloca i32, align 4 %x = alloca i32, align 4 diff --git a/test/test_suite2/macros/macro_with_body.c3t b/test/test_suite2/macros/macro_with_body.c3t index 6eacc83ee..46e5034e2 100644 --- a/test/test_suite2/macros/macro_with_body.c3t +++ b/test/test_suite2/macros/macro_with_body.c3t @@ -45,7 +45,7 @@ fn void main() /* #expect: withbody.ll -define i32 @withbody.Foo__mutate(ptr %0) #0 { +define i32 @withbody_Foo_mutate(ptr %0) #0 { entry: %1 = call i32 (ptr, ...) @printf(ptr @.str.2) %2 = getelementptr inbounds %Foo, ptr %0, i32 0, i32 0 @@ -56,7 +56,7 @@ entry: ret i32 %mul } -define void @withbody.main() #0 { +define void @withbody_main() #0 { entry: %f = alloca %Foo, align 4 %y = alloca i32, align 4 @@ -73,7 +73,7 @@ entry: %1 = getelementptr inbounds %Foo, ptr %foo, i32 0, i32 0 %2 = load i32, ptr %1, align 4 store i32 %2, ptr %y, align 4 - %3 = call i32 @withbody.Foo__mutate(ptr %foo) + %3 = call i32 @withbody_Foo_mutate(ptr %foo) store i32 %3, ptr %x, align 4 %4 = load i32, ptr %y, align 4 store i32 %4, ptr %dy, align 4 diff --git a/test/test_suite2/macros/userland_bitcast.c3t b/test/test_suite2/macros/userland_bitcast.c3t index d3214484a..4ad32380a 100644 --- a/test/test_suite2/macros/userland_bitcast.c3t +++ b/test/test_suite2/macros/userland_bitcast.c3t @@ -78,11 +78,11 @@ fn void main() %Foo = type { i16, i8, i8, i16, i16 } -@.typeid.userland_bitcast.Foo = linkonce constant { i8, i64 } { i8 10, i64 5 }, align 8 +@"ct$userland_bitcast_Foo" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 5, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [16 x i8] c"%f => %d => %f\0A\00", align 1 @.str.1 = private unnamed_addr constant [18 x i8] c"%e => %llu => %e\0A\00", align 1 -define i64 @userland_bitcast.testFoo(i16 signext %0) #0 { +define i64 @userland_bitcast_testFoo(i16 signext %0) #0 { entry: %z = alloca %Foo, align 2 %expr = alloca %Foo, align 2 @@ -133,7 +133,7 @@ loop.exit: ; preds = %loop.cond ret i64 %15 } -define i32 @userland_bitcast.test(float %0) #0 { +define i32 @userland_bitcast_test(float %0) #0 { entry: %expr = alloca float, align 4 %x = alloca [4 x i8], align 1 @@ -172,7 +172,7 @@ loop.exit: ; preds = %loop.cond ret i32 %8 } -define void @userland_bitcast.main() #0 { +define void @userland_bitcast_main() #0 { entry: %f = alloca float, align 4 %i = alloca i32, align 4 @@ -270,6 +270,7 @@ loop.exit14: ; preds = %loop.cond8 store double %21, ptr %expr16, align 8 store ptr %expr16, ptr %b18, align 8 store ptr %x17, ptr %to19, align 8 + store i64 0, ptr %i20, align 8 br label %loop.cond21 loop.cond21: ; preds = %loop.body23, %loop.exit14 diff --git a/test/test_suite2/methods/enum_distinct_err_methods.c3t b/test/test_suite2/methods/enum_distinct_err_methods.c3t index 0cf37cd9c..dd1127d7d 100644 --- a/test/test_suite2/methods/enum_distinct_err_methods.c3t +++ b/test/test_suite2/methods/enum_distinct_err_methods.c3t @@ -43,21 +43,21 @@ fn int main() /* #expect: foo.ll -define void @foo.Foo__hello(ptr %0) #0 { +define void @foo_Foo_hello(ptr %0) #0 { entry: - %1 = call i32 @"std::io.println"(ptr @.str) #1 + %1 = call i32 @std_io_println(ptr @.str) #1 ret void } -define void @foo.Bar__hello(ptr %0) #0 { +define void @foo_Bar_hello(ptr %0) #0 { entry: - %1 = call i32 @"std::io.println"(ptr @.str.1) #1 + %1 = call i32 @std_io_println(ptr @.str.1) #1 ret void } -define void @foo.MyEnum__hello(ptr %0) #0 { +define void @foo_MyEnum_hello(ptr %0) #0 { entry: - %1 = call i32 @"std::io.println"(ptr @.str.2) #1 + %1 = call i32 @std_io_println(ptr @.str.2) #1 ret void } @@ -69,8 +69,8 @@ entry: store i64 0, ptr %f, align 8 store i32 0, ptr %b, align 4 store i32 0, ptr %a, align 4 - call void @foo.Foo__hello(ptr %f) - call void @foo.Bar__hello(ptr %b) - call void @foo.MyEnum__hello(ptr %a) + call void @foo_Foo_hello(ptr %f) + call void @foo_Bar_hello(ptr %b) + call void @foo_MyEnum_hello(ptr %a) ret i32 0 } diff --git a/test/test_suite2/methods/extension_method.c3t b/test/test_suite2/methods/extension_method.c3t index 7068bb12c..4e795cbc1 100644 --- a/test/test_suite2/methods/extension_method.c3t +++ b/test/test_suite2/methods/extension_method.c3t @@ -33,8 +33,8 @@ define i32 @main() #0 { entry: %bar = alloca %Bar, align 4 store i32 0, ptr %bar, align 4 - call void @foo.Bar__test(ptr %bar) + call void @foo_Bar_test(ptr %bar) ret i32 0 } -declare void @foo.Bar__test(ptr) +declare void @foo_Bar_test(ptr) diff --git a/test/test_suite2/methods/extension_method_in_other_modules.c3t b/test/test_suite2/methods/extension_method_in_other_modules.c3t index 8a631f69a..d890ade5f 100644 --- a/test/test_suite2/methods/extension_method_in_other_modules.c3t +++ b/test/test_suite2/methods/extension_method_in_other_modules.c3t @@ -20,23 +20,23 @@ fn void main() /* #expect: foob.ll -define void @foob.Foo__test(ptr %0) #0 { +define void @foob_Foo_test(ptr %0) #0 { entry: ret void } // #expect: baz.ll -define void @foob.Foo__test2(ptr %0, i32 %1) #0 { +define void @foob_Foo_test2(ptr %0, i32 %1) #0 { entry: ret void } -define void @baz.main() #0 { +define void @baz_main() #0 { entry: %f = alloca %Foo, align 4 store i32 0, ptr %f, align 4 - call void @foob.Foo__test(ptr %f) - call void @foob.Foo__test2(ptr %f, i32 123) + call void @foob_Foo_test(ptr %f) + call void @foob_Foo_test2(ptr %f, i32 123) ret void } diff --git a/test/test_suite2/pointers/array_pointer_decay.c3t b/test/test_suite2/pointers/array_pointer_decay.c3t index 16bced48f..50ae346ba 100644 --- a/test/test_suite2/pointers/array_pointer_decay.c3t +++ b/test/test_suite2/pointers/array_pointer_decay.c3t @@ -20,7 +20,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca ptr, align 8 diff --git a/test/test_suite2/pointers/const_pointer.c3t b/test/test_suite2/pointers/const_pointer.c3t index 01c6da7a0..b8feacb81 100644 --- a/test/test_suite2/pointers/const_pointer.c3t +++ b/test/test_suite2/pointers/const_pointer.c3t @@ -10,7 +10,7 @@ private void*[3] data = { &foo, &bar, &xx }; /* #expect: const_pointer.ll -@const_pointer.foo = protected global double 1.700000e+01, align 8 -@const_pointer.bar = protected global double 1.200000e+01, align 8 -@const_pointer.xx = protected global float 1.200000e+01, align 4 -@const_pointer.data = protected unnamed_addr global [3 x ptr] [ptr @const_pointer.foo, ptr @const_pointer.bar, ptr @const_pointer.xx], align 16 +@const_pointer_foo = protected global double 1.700000e+01, align 8 +@const_pointer_bar = protected global double 1.200000e+01, align 8 +@const_pointer_xx = protected global float 1.200000e+01, align 4 +@const_pointer_data = protected unnamed_addr global [3 x ptr] [ptr @const_pointer_foo, ptr @const_pointer_bar, ptr @const_pointer_xx], align 16 diff --git a/test/test_suite2/pointers/pointer_index.c3t b/test/test_suite2/pointers/pointer_index.c3t index 875c06ec2..53d8e973a 100644 --- a/test/test_suite2/pointers/pointer_index.c3t +++ b/test/test_suite2/pointers/pointer_index.c3t @@ -24,7 +24,7 @@ fn void test3(long* x) // #expect: pointer_index.ll -define void @pointer_index.test1(ptr %0) #0 { +define void @pointer_index_test1(ptr %0) #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 @@ -45,7 +45,7 @@ entry: } ; Function Attrs: nounwind -define void @pointer_index.test2(ptr %0) #0 { +define void @pointer_index_test2(ptr %0) #0 { entry: %a = alloca i8, align 1 %b = alloca i8, align 1 @@ -61,7 +61,7 @@ entry: ret void } -define void @pointer_index.test3(ptr %0) #0 { +define void @pointer_index_test3(ptr %0) #0 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 diff --git a/test/test_suite2/pointers/subarray_variant_to_ptr.c3t b/test/test_suite2/pointers/subarray_variant_to_ptr.c3t index 986a669e6..64b407af4 100644 --- a/test/test_suite2/pointers/subarray_variant_to_ptr.c3t +++ b/test/test_suite2/pointers/subarray_variant_to_ptr.c3t @@ -29,9 +29,9 @@ fn void main() %variant = type { ptr, i64 } %"int[]" = type { ptr, i64 } -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test1(i64 %0, ptr %1) #0 { +define void @foo_test1(i64 %0, ptr %1) #0 { entry: %z = alloca %variant, align 8 %w = alloca ptr, align 8 @@ -48,7 +48,7 @@ entry: ret void } -define void @foo.test2(ptr %0, i64 %1) #0 { +define void @foo_test2(ptr %0, i64 %1) #0 { entry: %z = alloca %"int[]", align 8 %w = alloca ptr, align 8 @@ -65,7 +65,7 @@ entry: ret void } -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 @@ -76,13 +76,13 @@ entry: store i32 293483, ptr %y, align 4 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %w, ptr align 4 @.__const, i32 8, i1 false) %0 = insertvalue %variant undef, ptr %x, 0 - %1 = insertvalue %variant %0, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %1 = insertvalue %variant %0, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %1, ptr %taddr, align 8 %2 = getelementptr inbounds { i64, ptr }, ptr %taddr, i32 0, i32 0 %lo = load i64, ptr %2, align 8 %3 = getelementptr inbounds { i64, ptr }, ptr %taddr, i32 0, i32 1 %hi = load ptr, ptr %3, align 8 - call void @foo.test1(i64 %lo, ptr %hi) + call void @foo_test1(i64 %lo, ptr %hi) %4 = getelementptr inbounds [2 x i32], ptr %w, i64 0, i64 0 %5 = insertvalue %"int[]" undef, ptr %4, 0 %6 = insertvalue %"int[]" %5, i64 2, 1 @@ -91,6 +91,6 @@ entry: %lo2 = load ptr, ptr %7, align 8 %8 = getelementptr inbounds { ptr, i64 }, ptr %taddr1, i32 0, i32 1 %hi3 = load i64, ptr %8, align 8 - call void @foo.test2(ptr %lo2, i64 %hi3) + call void @foo_test2(ptr %lo2, i64 %hi3) ret void } \ No newline at end of file diff --git a/test/test_suite2/safe/deref.c3t b/test/test_suite2/safe/deref.c3t index 8f13e8c9e..b50a49013 100644 --- a/test/test_suite2/safe/deref.c3t +++ b/test/test_suite2/safe/deref.c3t @@ -9,7 +9,7 @@ fn void main() /* #expect: foo.ll -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca ptr, align 8 %y = alloca i32, align 4 @@ -19,7 +19,7 @@ entry: br i1 %checknull, label %panic, label %checkok panic: ; preds = %entry - call void @"std::core::builtin.panic"(ptr @.zstr, ptr @.zstr.1, ptr @.zstr.2, i32 6) + call void @std_core_builtin_panic(ptr @.zstr, ptr @.zstr.1, ptr @.zstr.2, i32 6) br label %checkok checkok: ; preds = %panic, %entry diff --git a/test/test_suite2/slices/slice_assign.c3t b/test/test_suite2/slices/slice_assign.c3t index 334be2059..1a202efa3 100644 --- a/test/test_suite2/slices/slice_assign.c3t +++ b/test/test_suite2/slices/slice_assign.c3t @@ -23,7 +23,7 @@ fn void main() ; Function Attrs: nounwind declare void @printf(ptr, ...) #0 -define void @test.main() #0 { +define void @test_main() #0 { entry: %x = alloca [8 x i32], align 16 %anon = alloca i64, align 8 @@ -84,6 +84,6 @@ exit: ; preds = %cond ; Function Attrs: nounwind define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @test.main() + call void @test_main() ret i32 0 } diff --git a/test/test_suite2/statements/comparison_widening.c3t b/test/test_suite2/statements/comparison_widening.c3t index 207c71a12..7f4895058 100644 --- a/test/test_suite2/statements/comparison_widening.c3t +++ b/test/test_suite2/statements/comparison_widening.c3t @@ -10,7 +10,7 @@ fn void test1() // #expect: comparison_widening.ll -define void @comparison_widening.test1() #0 { +define void @comparison_widening_test1() #0 { entry: %a = alloca i8, align 1 %b = alloca i32, align 4 diff --git a/test/test_suite2/statements/custom_foreach_with_ref.c3t b/test/test_suite2/statements/custom_foreach_with_ref.c3t index c180a5f58..ae0fef70e 100644 --- a/test/test_suite2/statements/custom_foreach_with_ref.c3t +++ b/test/test_suite2/statements/custom_foreach_with_ref.c3t @@ -83,10 +83,9 @@ fn void main() /* #expect: foo.ll - %Foo = type { [3 x i32] } -@.typeid.foo.Foo = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 +@"ct$foo_Foo" = linkonce constant %.introspect { i8 10, i64 12, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.str = private unnamed_addr constant [11 x i8] c"getFields\0A\00", align 1 @.str.1 = private unnamed_addr constant [11 x i8] c"Call made\0A\00", align 1 @.__const = private unnamed_addr constant %Foo { [3 x i32] [i32 1, i32 5, i32 7] }, align 4 @@ -103,7 +102,7 @@ fn void main() @.str.12 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.13 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 -define void @foo.getFields(ptr noalias sret([5 x i32]) align 4 %0) #0 { +define void @foo_getFields(ptr noalias sret([5 x i32]) align 4 %0) #0 { entry: %literal = alloca [5 x i32], align 16 call void (ptr, ...) @printf(ptr @.str) @@ -121,13 +120,13 @@ entry: ret void } -define ptr @foo.call(ptr %0) #0 { +define ptr @foo_call(ptr %0) #0 { entry: call void (ptr, ...) @printf(ptr @.str.1) ret ptr %0 } -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca %Foo, align 4 %a = alloca i32, align 4 @@ -200,7 +199,7 @@ entry: %11 = load i32, ptr %10, align 4 call void (ptr, ...) @printf(ptr @.str.2, i32 %3, i32 %7, i32 %11) store i32 0, ptr %anon, align 4 - %12 = call ptr @foo.call(ptr %x) + %12 = call ptr @foo_call(ptr %x) store ptr %12, ptr %anon5, align 8 store i32 3, ptr %anon6, align 4 br label %loop.cond @@ -388,7 +387,7 @@ loop.body58: ; preds = %loop.cond57 loop.exit63: ; preds = %loop.cond57 store i64 0, ptr %anon64, align 8 - call void @foo.getFields(ptr sret([5 x i32]) align 4 %sretparam) + call void @foo_getFields(ptr sret([5 x i32]) align 4 %sretparam) call void @llvm.memcpy.p0.p0.i32(ptr align 16 %anon65, ptr align 4 %sretparam, i32 20, i1 false) br label %loop.cond66 @@ -414,7 +413,7 @@ loop.body68: ; preds = %loop.cond66 loop.exit72: ; preds = %loop.cond66 store i64 0, ptr %anon73, align 8 - call void @foo.getFields(ptr sret([5 x i32]) align 4 %sretparam75) + call void @foo_getFields(ptr sret([5 x i32]) align 4 %sretparam75) store ptr %sretparam75, ptr %anon74, align 8 br label %loop.cond76 diff --git a/test/test_suite2/statements/defer_break.c3t b/test/test_suite2/statements/defer_break.c3t index c20d7f7ac..50260f094 100644 --- a/test/test_suite2/statements/defer_break.c3t +++ b/test/test_suite2/statements/defer_break.c3t @@ -51,7 +51,7 @@ define i32 @main(i32 %0, ptr %1) #0 { entry: %a = alloca i32, align 4 store i32 0, ptr %a, align 4 - call void @foo.defer2() + call void @foo_defer2() %2 = load i32, ptr %a, align 4 %eq = icmp eq i32 %2, 1 br i1 %eq, label %if.then, label %if.exit @@ -60,7 +60,7 @@ if.then: ; preds = %entry br label %loop.exit if.exit: ; preds = %entry - call void @foo.defer1() + call void @foo_defer1() br label %loop.exit loop.exit: ; preds = %if.exit, %if.then @@ -76,13 +76,13 @@ loop.body: ; preds = %loop.cond br i1 %eq1, label %if.then2, label %if.exit3 if.then2: ; preds = %loop.body - call void @foo.defer4() + call void @foo_defer4() br label %loop.exit4 if.exit3: ; preds = %loop.body - call void @foo.defer6() - call void @foo.defer5() - call void @foo.defer4() + call void @foo_defer6() + call void @foo_defer5() + call void @foo_defer4() br label %loop.cond loop.exit4: ; preds = %if.then2, %loop.cond @@ -98,17 +98,17 @@ loop.body7: ; preds = %loop.cond5 br i1 %eq8, label %if.then9, label %if.exit10 if.then9: ; preds = %loop.body7 - call void @foo.defer8() + call void @foo_defer8() br label %loop.exit11 if.exit10: ; preds = %loop.body7 - call void @foo.defer10() - call void @foo.defer9() - call void @foo.defer8() + call void @foo_defer10() + call void @foo_defer9() + call void @foo_defer8() br label %loop.exit11 loop.exit11: ; preds = %if.exit10, %if.then9, %loop.cond5 - call void @foo.defer7() - call void @foo.defer3() + call void @foo_defer7() + call void @foo_defer3() ret i32 0 } \ No newline at end of file diff --git a/test/test_suite2/statements/defer_break_simple.c3t b/test/test_suite2/statements/defer_break_simple.c3t index d87e809a4..ccf939509 100644 --- a/test/test_suite2/statements/defer_break_simple.c3t +++ b/test/test_suite2/statements/defer_break_simple.c3t @@ -41,16 +41,16 @@ loop.body: ; preds = %loop.cond br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %loop.body - call void @test.testA() - call void @test.testB() - call void @test.test2() + call void @test_testA() + call void @test_testB() + call void @test_test2() br label %loop.exit if.exit: ; preds = %loop.body - call void @test.test3() - call void @test.testA() - call void @test.testB() - call void @test.test2() + call void @test_test3() + call void @test_testA() + call void @test_testB() + call void @test_test2() br label %loop.cond loop.exit: ; preds = %if.then, %loop.cond diff --git a/test/test_suite2/statements/defer_break_switch.c3t b/test/test_suite2/statements/defer_break_switch.c3t index abec39467..d70f10eb4 100644 --- a/test/test_suite2/statements/defer_break_switch.c3t +++ b/test/test_suite2/statements/defer_break_switch.c3t @@ -21,7 +21,7 @@ fn void test(int i) /* #expect: defer_break_switch.ll -define void @defer_break_switch.test(i32 %0) #0 { +define void @defer_break_switch_test(i32 %0) #0 { entry: %b = alloca i8, align 1 %switch = alloca i32, align 4 @@ -42,16 +42,16 @@ switch.case: ; preds = %switch.entry br i1 %3, label %if.then, label %if.exit if.then: ; preds = %switch.case - call void @defer_break_switch.test2() + call void @defer_break_switch_test2() br label %switch.exit if.exit: ; preds = %switch.case - call void @defer_break_switch.test1() - call void @defer_break_switch.test2() + call void @defer_break_switch_test1() + call void @defer_break_switch_test2() br label %switch.exit switch.case1: ; preds = %switch.entry - call void @defer_break_switch.test1() + call void @defer_break_switch_test1() br label %switch.exit switch.exit: ; preds = %switch.case1, %if.exit, %if.then, %switch.entry diff --git a/test/test_suite2/statements/defer_do_while.c3t b/test/test_suite2/statements/defer_do_while.c3t index d401502c8..3cd84eaae 100644 --- a/test/test_suite2/statements/defer_do_while.c3t +++ b/test/test_suite2/statements/defer_do_while.c3t @@ -13,7 +13,7 @@ fn void test() /* #expect: foo.ll -define void @foo.test() #0 { +define void @foo_test() #0 { entry: %a = alloca i32, align 4 store i32 0, ptr %a, align 4 diff --git a/test/test_suite2/statements/defer_in_block.c3t b/test/test_suite2/statements/defer_in_block.c3t index 46b3c9954..df2e63eed 100644 --- a/test/test_suite2/statements/defer_in_block.c3t +++ b/test/test_suite2/statements/defer_in_block.c3t @@ -28,7 +28,7 @@ fn void main() } /* #expect: foo.ll -define void @foo.test(i32 %0) #0 { +define void @foo_test(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, ptr %x, align 4 @@ -78,10 +78,10 @@ if.exit6: ; preds = %if.exit3 } ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: - call void @foo.test(i32 123) - call void @foo.test(i32 1) - call void @foo.test(i32 0) + call void @foo_test(i32 123) + call void @foo_test(i32 1) + call void @foo_test(i32 0) ret void } diff --git a/test/test_suite2/statements/defer_in_defer.c3t b/test/test_suite2/statements/defer_in_defer.c3t index 6d9e15b73..e61cfb5ad 100644 --- a/test/test_suite2/statements/defer_in_defer.c3t +++ b/test/test_suite2/statements/defer_in_defer.c3t @@ -22,17 +22,17 @@ fn void test_line() // #expect: defer_in_defer.ll -define void @defer_in_defer.test() #0 { +define void @defer_in_defer_test() #0 { entry: - call void @defer_in_defer.test4() - call void @defer_in_defer.test2() - call void @defer_in_defer.test3() - call void @defer_in_defer.test1() + call void @defer_in_defer_test4() + call void @defer_in_defer_test2() + call void @defer_in_defer_test3() + call void @defer_in_defer_test1() ret void } -define void @defer_in_defer.test_line() #0 { +define void @defer_in_defer_test_line() #0 { entry: - call void @defer_in_defer.test1() + call void @defer_in_defer_test1() ret void } diff --git a/test/test_suite2/statements/defer_in_defer2.c3t b/test/test_suite2/statements/defer_in_defer2.c3t index 5de8af3a3..173cb87e8 100644 --- a/test/test_suite2/statements/defer_in_defer2.c3t +++ b/test/test_suite2/statements/defer_in_defer2.c3t @@ -32,7 +32,7 @@ fn void main() /* #expect: test.ll -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, ptr %x, align 4 diff --git a/test/test_suite2/statements/defer_next_switch.c3t b/test/test_suite2/statements/defer_next_switch.c3t index 011484cd5..649c25d55 100644 --- a/test/test_suite2/statements/defer_next_switch.c3t +++ b/test/test_suite2/statements/defer_next_switch.c3t @@ -21,7 +21,7 @@ fn void test(int i) /* #expect: defer_next_switch.ll -define void @defer_next_switch.test(i32 %0) #0 { +define void @defer_next_switch_test(i32 %0) #0 { entry: %b = alloca i8, align 1 %switch = alloca i32, align 4 @@ -42,16 +42,16 @@ switch.case: ; preds = %switch.entry br i1 %3, label %if.then, label %if.exit if.then: ; preds = %switch.case - call void @defer_next_switch.test2() + call void @defer_next_switch_test2() br label %switch.case1 if.exit: ; preds = %switch.case - call void @defer_next_switch.test1() - call void @defer_next_switch.test2() + call void @defer_next_switch_test1() + call void @defer_next_switch_test2() br label %switch.exit switch.case1: ; preds = %switch.entry, %if.then - call void @defer_next_switch.test1() + call void @defer_next_switch_test1() br label %switch.exit switch.exit: ; preds = %switch.case1, %if.exit, %switch.entry diff --git a/test/test_suite2/statements/defer_return.c3t b/test/test_suite2/statements/defer_return.c3t index 9d9c43d6f..28e12ff6e 100644 --- a/test/test_suite2/statements/defer_return.c3t +++ b/test/test_suite2/statements/defer_return.c3t @@ -54,14 +54,14 @@ loop.body: ; preds = %loop.cond if.then: ; preds = %loop.body %3 = load i32, ptr %a, align 4 %add = add i32 %3, %0 - call void @test.test2() - call void @test.test1() + call void @test_test2() + call void @test_test1() ret i32 %add if.exit: ; preds = %loop.body - call void @test.test4() - call void @test.test3() - call void @test.test2() + call void @test_test4() + call void @test_test3() + call void @test_test2() br label %loop.cond loop.exit: ; preds = %loop.cond @@ -79,22 +79,22 @@ loop.body3: ; preds = %loop.cond1 if.then5: ; preds = %loop.body3 %5 = load i32, ptr %a, align 4 %add6 = add i32 %5, 2 - call void @test.test6() - call void @test.test5() - call void @test.test1() + call void @test_test6() + call void @test_test5() + call void @test_test1() ret i32 %add6 if.exit7: ; preds = %loop.body3 - call void @test.test8() - call void @test.test7() - call void @test.test6() - call void @test.test5() - call void @test.test1() + call void @test_test8() + call void @test_test7() + call void @test_test6() + call void @test_test5() + call void @test_test1() ret i32 4 loop.exit8: ; preds = %loop.cond1 %add9 = add i32 0, %0 - call void @test.test5() - call void @test.test1() + call void @test_test5() + call void @test_test1() ret i32 %add9 } \ No newline at end of file diff --git a/test/test_suite2/statements/defer_with_loop.c3t b/test/test_suite2/statements/defer_with_loop.c3t index be69a28bc..717e5f771 100644 --- a/test/test_suite2/statements/defer_with_loop.c3t +++ b/test/test_suite2/statements/defer_with_loop.c3t @@ -29,7 +29,7 @@ fn void main() /* #expect: test.ll -define void @test.test(i32 %0) #0 { +define void @test_test(i32 %0) #0 { entry: %i = alloca i32, align 4 %i4 = alloca i32, align 4 diff --git a/test/test_suite2/statements/fallthough_do.c3t b/test/test_suite2/statements/fallthough_do.c3t index 0cc625ab7..65c2bfb6b 100644 --- a/test/test_suite2/statements/fallthough_do.c3t +++ b/test/test_suite2/statements/fallthough_do.c3t @@ -35,19 +35,18 @@ fn void main() /* #expect: foo.ll - -@test.x = internal unnamed_addr global i32 0, align 4 +@"test$x" = internal unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%d, %d\0A\00", align 1 -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 store i32 10, ptr %i, align 4 - %0 = call i32 @foo.test() + %0 = call i32 @foo_test() call void (ptr, ...) @printf(ptr @.str, i32 %0) %1 = load i32, ptr %i, align 4 - %2 = call i32 @foo.test() + %2 = call i32 @foo_test() call void (ptr, ...) @printf(ptr @.str.1, i32 %1, i32 %2) %3 = load i32, ptr %i, align 4 %lt = icmp slt i32 %3, 0 @@ -58,7 +57,7 @@ if.then: ; preds = %entry if.exit: ; preds = %entry %4 = load i32, ptr %i, align 4 - %5 = call i32 @foo.test() + %5 = call i32 @foo_test() call void (ptr, ...) @printf(ptr @.str.2, i32 %4, i32 %5) br label %loop.exit @@ -72,7 +71,7 @@ if.then2: ; preds = %loop.exit if.exit3: ; preds = %loop.exit %7 = load i32, ptr %i, align 4 - %8 = call i32 @foo.test() + %8 = call i32 @foo_test() call void (ptr, ...) @printf(ptr @.str.3, i32 %7, i32 %8) br label %loop.exit4 diff --git a/test/test_suite2/statements/foreach_break.c3t b/test/test_suite2/statements/foreach_break.c3t index 6727ef55b..ab7695033 100644 --- a/test/test_suite2/statements/foreach_break.c3t +++ b/test/test_suite2/statements/foreach_break.c3t @@ -15,7 +15,7 @@ fn void test() /* #expect: test.ll -define void @test.test() #0 { +define void @test_test() #0 { entry: %x = alloca [3 x i32], align 4 %g = alloca i32, align 4 diff --git a/test/test_suite2/statements/foreach_common.c3t b/test/test_suite2/statements/foreach_common.c3t index 6af3798ae..74047c75b 100644 --- a/test/test_suite2/statements/foreach_common.c3t +++ b/test/test_suite2/statements/foreach_common.c3t @@ -73,7 +73,7 @@ target triple = "x86_64-apple-darwin" declare void @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @test.main() #0 { +define void @test_main() #0 { entry: %foo = alloca [3 x float], align 4 %foo2 = alloca <3 x float>, align 16 @@ -361,6 +361,6 @@ loop.exit80: ; preds = %loop.cond74 ; Function Attrs: nounwind define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @test.main() + call void @test_main() ret i32 0 } diff --git a/test/test_suite2/statements/foreach_custom.c3t b/test/test_suite2/statements/foreach_custom.c3t index 8f5a6c68c..30842d9c2 100644 --- a/test/test_suite2/statements/foreach_custom.c3t +++ b/test/test_suite2/statements/foreach_custom.c3t @@ -34,7 +34,7 @@ extern fn int printf(char *fmt, ...); /* #expect: foo.ll ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca [3 x i32], align 4 %x = alloca %Foo, align 8 diff --git a/test/test_suite2/statements/foreach_custom_macro.c3t b/test/test_suite2/statements/foreach_custom_macro.c3t index 1ca07214b..18f530482 100644 --- a/test/test_suite2/statements/foreach_custom_macro.c3t +++ b/test/test_suite2/statements/foreach_custom_macro.c3t @@ -31,7 +31,6 @@ fn void main() extern fn int printf(char *fmt, ...); /* #expect: foo.ll - source_filename = "foo" target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" @@ -39,12 +38,12 @@ target triple = "x86_64-apple-darwin" %Foo = type { %"int[]" } %"int[]" = type { ptr, i64 } -@.typeid.foo.Foo = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 +@"ct$foo_Foo" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant [3 x i32] [i32 1, i32 3, i32 10], align 4 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca [3 x i32], align 4 %x = alloca %Foo, align 8 @@ -97,7 +96,7 @@ declare i32 @printf(ptr, ...) #0 ; Function Attrs: nounwind define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @foo.main() + call void @foo_main() ret i32 0 } diff --git a/test/test_suite2/statements/if_tests.c3t b/test/test_suite2/statements/if_tests.c3t index 5ed75c81c..472808f28 100644 --- a/test/test_suite2/statements/if_tests.c3t +++ b/test/test_suite2/statements/if_tests.c3t @@ -28,7 +28,7 @@ fn void test3(int x) // #expect: iftest.ll -define void @iftest.test1(i32 %0) #0 { +define void @iftest_test1(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, ptr %x, align 4 @@ -46,13 +46,13 @@ if.exit: ; preds = %if.then, %entry ret void } -define void @iftest.test2(i32 %0) #0 { +define void @iftest_test2(i32 %0) #0 { entry: %gt = icmp sgt i32 %0, 0 ret void } -define void @iftest.test3(i32 %0) #0 { +define void @iftest_test3(i32 %0) #0 { entry: %x = alloca i32, align 4 store i32 %0, ptr %x, align 4 diff --git a/test/test_suite2/statements/labelled_continue_for.c3t b/test/test_suite2/statements/labelled_continue_for.c3t index c44a7ae9d..c5b3c254c 100644 --- a/test/test_suite2/statements/labelled_continue_for.c3t +++ b/test/test_suite2/statements/labelled_continue_for.c3t @@ -24,7 +24,7 @@ fn void testBreak() /* #expect: labelled_continue_for.ll -define void @labelled_continue_for.testBreak() #0 { +define void @labelled_continue_for_testBreak() #0 { entry: %i = alloca i32, align 4 %j = alloca i32, align 4 @@ -50,16 +50,16 @@ loop.cond4: ; preds = %loop.body3 %lt5 = icmp slt i32 %2, 10 br i1 %lt5, label %loop.body6, label %loop.exit loop.body6: ; preds = %loop.cond4 - call void @labelled_continue_for.test() + call void @labelled_continue_for_test() br label %loop.inc loop.exit: ; preds = %loop.cond4 - call void @labelled_continue_for.errored() + call void @labelled_continue_for_errored() %3 = load i32, ptr %j, align 4 %add = add i32 %3, 1 store i32 %add, ptr %j, align 4 br label %loop.cond1 loop.exit7: ; preds = %loop.cond1 - call void @labelled_continue_for.errored() + call void @labelled_continue_for_errored() br label %loop.inc loop.inc: ; preds = %loop.exit7, %loop.body6 %4 = load i32, ptr %i, align 4 diff --git a/test/test_suite2/statements/ranged_switch.c3t b/test/test_suite2/statements/ranged_switch.c3t index 759a0be07..1dd39bef2 100644 --- a/test/test_suite2/statements/ranged_switch.c3t +++ b/test/test_suite2/statements/ranged_switch.c3t @@ -67,7 +67,7 @@ target triple = "x86_64-apple-darwin" declare void @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 %switch = alloca i32, align 4 @@ -223,7 +223,7 @@ switch.exit31: ; preds = %next_if30, %switch. ; Function Attrs: nounwind define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @foo.main() + call void @foo_main() ret i32 0 } diff --git a/test/test_suite2/statements/simple_do.c3t b/test/test_suite2/statements/simple_do.c3t index 87dc21d76..e2e4a18a3 100644 --- a/test/test_suite2/statements/simple_do.c3t +++ b/test/test_suite2/statements/simple_do.c3t @@ -26,21 +26,20 @@ fn void main() } /* #expect: foo.ll - source_filename = "foo" target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-apple-darwin" -@test.x = internal unnamed_addr global i32 0, align 4 +@"test$x" = internal unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%d, %d\0A\00", align 1 ; Function Attrs: nounwind -define i32 @foo.test() #0 { +define i32 @foo_test() #0 { entry: - %0 = load i32, ptr @test.x, align 4 + %0 = load i32, ptr @"test$x", align 4 %add = add i32 %0, 1 - store i32 %add, ptr @test.x, align 4 + store i32 %add, ptr @"test$x", align 4 %add1 = add i32 1, %0 ret i32 %add1 } @@ -49,7 +48,7 @@ entry: declare void @printf(ptr, ...) #0 ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %i = alloca i32, align 4 store i32 10, ptr %i, align 4 @@ -63,7 +62,7 @@ loop.cond: ; preds = %if.exit br i1 %gt, label %loop.body, label %loop.exit loop.body: ; preds = %loop.cond, %entry - %1 = call i32 @foo.test() + %1 = call i32 @foo_test() call void (ptr, ...) @printf(ptr @.str, i32 %1) %2 = load i32, ptr %i, align 4 %gt1 = icmp sgt i32 %2, 100 @@ -88,7 +87,7 @@ loop.cond2: ; preds = %if.exit5 loop.body3: ; preds = %loop.cond2, %loop.exit %4 = load i32, ptr %i, align 4 - %5 = call i32 @foo.test() + %5 = call i32 @foo_test() call void (ptr, ...) @printf(ptr @.str.1, i32 %4, i32 %5) %6 = load i32, ptr %i, align 4 %smod = srem i32 %6, 3 @@ -108,6 +107,6 @@ loop.exit6: ; preds = %if.then4, %loop.con ; Function Attrs: nounwind define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @foo.main() + call void @foo_main() ret i32 0 } diff --git a/test/test_suite2/statements/various_switching.c3t b/test/test_suite2/statements/various_switching.c3t index f6ceb8fe4..223ed2cc1 100644 --- a/test/test_suite2/statements/various_switching.c3t +++ b/test/test_suite2/statements/various_switching.c3t @@ -68,7 +68,7 @@ fn void main() /* #expect: mymodule.ll -define void @mymodule.test() #0 { +define void @mymodule_test() #0 { entry: %x = alloca i32, align 4 %x.f = alloca i64, align 8 @@ -81,8 +81,8 @@ entry: %zy = alloca i32, align 4 %switch17 = alloca i32, align 4 %switch27 = alloca i8, align 1 - store i64 ptrtoint (ptr @mymodule.ByeErr.BAR to i64), ptr %x.f, align 8 - store i64 ptrtoint (ptr @.typeid.int to i64), ptr %z, align 8 + store i64 ptrtoint (ptr @"mymodule_ByeErr$BAR" to i64), ptr %x.f, align 8 + store i64 ptrtoint (ptr @"ct$int" to i64), ptr %z, align 8 br label %testblock testblock: ; preds = %entry @@ -109,7 +109,7 @@ if.then: ; preds = %end_block switch.entry: ; preds = %if.then %2 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @mymodule.HelloErr.FOO to i64), %2 + %eq = icmp eq i64 ptrtoint (ptr @"mymodule_HelloErr$FOO" to i64), %2 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -117,7 +117,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint (ptr @mymodule.ByeErr.BAR to i64), %2 + %eq1 = icmp eq i64 ptrtoint (ptr @"mymodule_ByeErr$BAR" to i64), %2 br i1 %eq1, label %switch.case2, label %next_if3 switch.case2: ; preds = %next_if @@ -141,7 +141,7 @@ if.exit: ; preds = %switch.exit, %end_b switch.entry5: ; preds = %if.exit %4 = load i64, ptr %switch4, align 8 - %eq6 = icmp eq i64 ptrtoint (ptr @.typeid.int to i64), %4 + %eq6 = icmp eq i64 ptrtoint (ptr @"ct$int" to i64), %4 br i1 %eq6, label %switch.case7, label %next_if8 switch.case7: ; preds = %switch.entry5 @@ -149,14 +149,14 @@ switch.case7: ; preds = %switch.entry5 br label %switch.exit16 next_if8: ; preds = %switch.entry5 - %eq9 = icmp eq i64 ptrtoint (ptr @.typeid.bool to i64), %4 + %eq9 = icmp eq i64 ptrtoint (ptr @"ct$bool" to i64), %4 br i1 %eq9, label %switch.case10, label %next_if11 switch.case10: ; preds = %next_if8 br label %switch.case13 next_if11: ; preds = %next_if8 - %eq12 = icmp eq i64 ptrtoint (ptr @.typeid.double to i64), %4 + %eq12 = icmp eq i64 ptrtoint (ptr @"ct$double" to i64), %4 br i1 %eq12, label %switch.case13, label %next_if14 switch.case13: ; preds = %next_if11, %switch.case10 diff --git a/test/test_suite2/strings/literal_to_subarray.c3t b/test/test_suite2/strings/literal_to_subarray.c3t index 77580f172..4a7efe479 100644 --- a/test/test_suite2/strings/literal_to_subarray.c3t +++ b/test/test_suite2/strings/literal_to_subarray.c3t @@ -12,11 +12,11 @@ fn void test() %"char[]" = type { ptr, i64 } @.str = private unnamed_addr constant [6 x i8] c"hello\00", align 1 -@literal_to_subarray.y = local_unnamed_addr global %"char[]" { ptr @.str, i64 5 }, align 8 +@literal_to_subarray_y = local_unnamed_addr global %"char[]" { ptr @.str, i64 5 }, align 8 @.str.1 = private unnamed_addr constant [6 x i8] c"world\00", align 1 ; Function Attrs: nounwind -define void @literal_to_subarray.test() #0 { +define void @literal_to_subarray_test() #0 { entry: %x = alloca %"char[]", align 8 store %"char[]" { ptr @.str.1, i64 5 }, ptr %x, align 8 diff --git a/test/test_suite2/strings/string_escape.c3t b/test/test_suite2/strings/string_escape.c3t index e926a940a..448a0a796 100644 --- a/test/test_suite2/strings/string_escape.c3t +++ b/test/test_suite2/strings/string_escape.c3t @@ -8,7 +8,7 @@ fn void main() @.str = private unnamed_addr constant [18 x i8] c"Hello\00 world! now\00", align 1 -define void @string_escape.main() #0 { +define void @string_escape_main() #0 { entry: %s = alloca ptr, align 8 store ptr @.str, ptr %s, align 8 @@ -17,6 +17,6 @@ entry: define i32 @main(i32 %0, ptr %1) #0 { entry: - call void @string_escape.main() + call void @string_escape_main() ret i32 0 } \ No newline at end of file diff --git a/test/test_suite2/strings/string_len.c3t b/test/test_suite2/strings/string_len.c3t index 8d76b2898..e4594a8ea 100644 --- a/test/test_suite2/strings/string_len.c3t +++ b/test/test_suite2/strings/string_len.c3t @@ -4,4 +4,4 @@ int i = "123".len; /* #expect: string_len.ll -@string_len.i = local_unnamed_addr global i32 3, align 4 \ No newline at end of file +@string_len_i = local_unnamed_addr global i32 3, align 4 \ No newline at end of file diff --git a/test/test_suite2/struct/nested_struct_init.c3t b/test/test_suite2/struct/nested_struct_init.c3t index e846f04fb..ce348cb83 100644 --- a/test/test_suite2/struct/nested_struct_init.c3t +++ b/test/test_suite2/struct/nested_struct_init.c3t @@ -37,22 +37,24 @@ fn void main() %anon.0 = type { float, float, float, float } %Matrix2x2_b = type { %anon.1 } %anon.1 = type { [4 x float] } -@.typeid.foo.anon = linkonce constant { i8, i64 } { i8 10, i64 4 }, align 8 -@.typeid.foo.anon.1 = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.foo.Matrix2x2 = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 -@.typeid.foo.anon.2 = linkonce constant { i8, i64 } { i8 10, i64 4 }, align 8 -@.typeid.foo.anon.3 = linkonce constant { i8, i64 } { i8 11, i64 2 }, align 8 -@.typeid.foo.Matrix2x2_b = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 + +@"ct$foo_anon" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 4, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_anon.3" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_Matrix2x2" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_anon.6" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 4, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_anon.7" = linkonce constant %.introspect { i8 11, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@"ct$foo_Matrix2x2_b" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant %Matrix2x2 { %anon { %anon.0 { float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 } } }, align 4 -@.__const.4 = private unnamed_addr constant %Matrix2x2_b { %anon.1 { [4 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00] } }, align 4 +@.__const.8 = private unnamed_addr constant %Matrix2x2_b { %anon.1 { [4 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00] } }, align 4 @.str = private unnamed_addr constant [13 x i8] c"%f %f %f %f\0A\00", align 1 + ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %m = alloca %Matrix2x2, align 4 %m2 = alloca %Matrix2x2_b, align 4 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %m, ptr align 4 @.__const, i32 16, i1 false) - call void @llvm.memcpy.p0.p0.i32(ptr align 4 %m2, ptr align 4 @.__const.4, i32 16, i1 false) + call void @llvm.memcpy.p0.p0.i32(ptr align 4 %m2, ptr align 4 @.__const.8, i32 16, i1 false) %0 = getelementptr inbounds %Matrix2x2, ptr %m, i32 0, i32 0 %1 = getelementptr inbounds %anon.0, ptr %0, i32 0, i32 0 %2 = load float, ptr %1, align 4 diff --git a/test/test_suite2/struct/nested_struct_union_init.c3t b/test/test_suite2/struct/nested_struct_union_init.c3t index 22637eb52..07c4333e0 100644 --- a/test/test_suite2/struct/nested_struct_union_init.c3t +++ b/test/test_suite2/struct/nested_struct_union_init.c3t @@ -62,8 +62,7 @@ fn void main() %anon = type { %anon.0 } %anon.0 = type { float, float, float, float, float, float, float, float, float } - -define void @foob.main() #0 { +define void @foob_main() #0 { entry: %x = alloca %Matrix3x3, align 4 %m = alloca %Matrix2x2, align 4 @@ -88,7 +87,7 @@ entry: %9 = getelementptr inbounds %anon.0, ptr %0, i32 0, i32 8 store float 9.000000e+00, ptr %9, align 4 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %m, ptr align 4 @.__const, i32 16, i1 false) - call void @llvm.memcpy.p0.p0.i32(ptr align 4 %m2, ptr align 4 @.__const.8, i32 16, i1 false) + call void @llvm.memcpy.p0.p0.i32(ptr align 4 %m2, ptr align 4 @.__const.16, i32 16, i1 false) %10 = getelementptr inbounds %Matrix3x3, ptr %x, i32 0, i32 0 %11 = getelementptr inbounds %anon.0, ptr %10, i32 0, i32 0 %12 = load float, ptr %11, align 4 diff --git a/test/test_suite2/struct/simple_struct.c3t b/test/test_suite2/struct/simple_struct.c3t index 07bf821fe..fe64e4641 100644 --- a/test/test_suite2/struct/simple_struct.c3t +++ b/test/test_suite2/struct/simple_struct.c3t @@ -11,4 +11,4 @@ struct Foo // #expect: test.ll %Foo = type { i32, double } -@test.a = protected unnamed_addr global %Foo zeroinitializer, align 8 \ No newline at end of file +@test_a = protected unnamed_addr global %Foo zeroinitializer, align 8 \ No newline at end of file diff --git a/test/test_suite2/struct/struct_as_value.c3t b/test/test_suite2/struct/struct_as_value.c3t index 310b9a506..e8d2156b0 100644 --- a/test/test_suite2/struct/struct_as_value.c3t +++ b/test/test_suite2/struct/struct_as_value.c3t @@ -14,14 +14,13 @@ fn Event test(int x) } /* #expect: test.ll - %Event = type { i32 } -@.typeid.test.Event = linkonce constant { i8, i64 } { i8 10, i64 1 }, align 8 +@"ct$test_Event" = linkonce constant %.introspect { i8 10, i64 4, i64 0, i64 1, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant %Event { i32 1 }, align 4 @.__const.1 = private unnamed_addr constant %Event { i32 2 }, align 4 -define i32 @test.test(i32 %0) #0 { +define i32 @test_test(i32 %0) #0 { entry: %foo = alloca %Event, align 4 %bar = alloca %Event, align 4 diff --git a/test/test_suite2/struct/struct_as_value_aarch64.c3t b/test/test_suite2/struct/struct_as_value_aarch64.c3t index b17098766..54740fa84 100644 --- a/test/test_suite2/struct/struct_as_value_aarch64.c3t +++ b/test/test_suite2/struct/struct_as_value_aarch64.c3t @@ -15,7 +15,7 @@ fn Event test(int x) /* #expect: test.ll -define i32 @test.test(i32 %0) #0 { +define i32 @test_test(i32 %0) #0 { entry: %foo = alloca %Event, align 4 %bar = alloca %Event, align 4 diff --git a/test/test_suite2/struct/struct_codegen.c3t b/test/test_suite2/struct/struct_codegen.c3t index c77564366..9cefb4e9a 100644 --- a/test/test_suite2/struct/struct_codegen.c3t +++ b/test/test_suite2/struct/struct_codegen.c3t @@ -16,12 +16,12 @@ fn void test1() %Point = type { i32, i32 } -@.typeid.test.Point = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 +@"ct$test_Point" = linkonce constant %.introspect { i8 10, i64 8, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 @.__const = private unnamed_addr constant %Point { i32 5, i32 6 }, align 4 -define void @test.test1() #0 { +define void @test_test1() #0 { entry: %p = alloca %Point, align 4 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %p, ptr align 4 @.__const, i32 8, i1 false) ret void -} +} \ No newline at end of file diff --git a/test/test_suite2/struct/struct_codegen_empty.c3t b/test/test_suite2/struct/struct_codegen_empty.c3t index e2ccf101d..71c59354a 100644 --- a/test/test_suite2/struct/struct_codegen_empty.c3t +++ b/test/test_suite2/struct/struct_codegen_empty.c3t @@ -23,7 +23,7 @@ fn void test() /* #expect: struct_codegen_empty.ll - define void @struct_codegen_empty.test() #0 { + define void @struct_codegen_empty_test() #0 { entry: %a = alloca %StructA, align 4 %a2 = alloca %StructA, align 4 diff --git a/test/test_suite2/struct/struct_codegen_fam.c3t b/test/test_suite2/struct/struct_codegen_fam.c3t index fdca371e9..bbb9893db 100644 --- a/test/test_suite2/struct/struct_codegen_fam.c3t +++ b/test/test_suite2/struct/struct_codegen_fam.c3t @@ -22,7 +22,7 @@ fn void test(Bar b) %Bar = type { %anon, i32, [0 x i32] } %anon = type { i32 } -define void @foo.test(ptr byval(%Bar) align 8 %0) #0 { +define void @foo_test(ptr byval(%Bar) align 8 %0) #0 { entry: %b = alloca %Bar, align 4 call void @llvm.memcpy.p0.p0.i32(ptr align 4 %b, ptr align 8 %0, i32 8, i1 false) diff --git a/test/test_suite2/struct/struct_const_construct_simple.c3t b/test/test_suite2/struct/struct_const_construct_simple.c3t index 132bd74ff..54e473501 100644 --- a/test/test_suite2/struct/struct_const_construct_simple.c3t +++ b/test/test_suite2/struct/struct_const_construct_simple.c3t @@ -20,15 +20,13 @@ private Foo foo8 = FOO7; /* #expect: structo.ll -%Foo = type { i32, i64 } - -@.typeid.structo.Foo = linkonce constant { i8, i64 } { i8 10, i64 2 }, align 8 -@structo.x = protected unnamed_addr global i64 16, align 8 -@structo.foo1 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 -@structo.foo2 = protected unnamed_addr global %Foo { i32 2, i64 0 }, align 8 -@structo.foo3 = protected unnamed_addr global %Foo { i32 0, i64 3 }, align 8 -@structo.foo4 = protected unnamed_addr global %Foo { i32 4, i64 1 }, align 8 -@structo.foo5 = protected unnamed_addr global %Foo zeroinitializer, align 8 -@structo.foo6 = protected unnamed_addr global %Foo zeroinitializer, align 8 -@structo.FOO7 = protected unnamed_addr constant %Foo { i32 1, i64 2 }, align 8 -@structo.foo8 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 \ No newline at end of file +@"ct$structo_Foo" = linkonce constant %.introspect { i8 10, i64 16, i64 0, i64 2, [0 x i64] zeroinitializer }, align 8 +@structo_x = protected unnamed_addr global i64 16, align 8 +@structo_foo1 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 +@structo_foo2 = protected unnamed_addr global %Foo { i32 2, i64 0 }, align 8 +@structo_foo3 = protected unnamed_addr global %Foo { i32 0, i64 3 }, align 8 +@structo_foo4 = protected unnamed_addr global %Foo { i32 4, i64 1 }, align 8 +@structo_foo5 = protected unnamed_addr global %Foo zeroinitializer, align 8 +@structo_foo6 = protected unnamed_addr global %Foo zeroinitializer, align 8 +@structo_FOO7 = protected unnamed_addr constant %Foo { i32 1, i64 2 }, align 8 +@structo_foo8 = protected unnamed_addr global %Foo { i32 1, i64 2 }, align 8 diff --git a/test/test_suite2/struct/struct_pack_and_align.c3t b/test/test_suite2/struct/struct_pack_and_align.c3t index d9110467e..a2b58755f 100644 --- a/test/test_suite2/struct/struct_pack_and_align.c3t +++ b/test/test_suite2/struct/struct_pack_and_align.c3t @@ -78,14 +78,14 @@ Foo6 foo6 = { 1, 2, 3 }; %Foo5 = type { i32, [12 x i8], i8, [15 x i8] } %Foo6 = type { i32, i16, i16 } -@struct2.foo1 = local_unnamed_addr global %Foo1 <{ i64 1, i8 2, [3 x i8] undef }>, align 4 -@struct2.foo2 = local_unnamed_addr global %Foo2 <{ i8 1, i64 2, [3 x i8] undef }>, align 4 -@struct2.foo3 = local_unnamed_addr global %Foo3 <{ i8 1, i64 2, [7 x i8] undef }>, align 8 -@struct2.foo4 = local_unnamed_addr global %Foo4 <{ i8 1, i64 2 }>, align 1 -@struct2.foo5 = local_unnamed_addr global %Foo5 { i32 1, [12 x i8] undef, i8 2, [15 x i8] undef }, align 16 -@struct2.foo6 = local_unnamed_addr global %Foo6 { i32 1, i16 2, i16 3 }, align 1 +@struct2_foo1 = local_unnamed_addr global %Foo1 <{ i64 1, i8 2, [3 x i8] undef }>, align 4 +@struct2_foo2 = local_unnamed_addr global %Foo2 <{ i8 1, i64 2, [3 x i8] undef }>, align 4 +@struct2_foo3 = local_unnamed_addr global %Foo3 <{ i8 1, i64 2, [7 x i8] undef }>, align 8 +@struct2_foo4 = local_unnamed_addr global %Foo4 <{ i8 1, i64 2 }>, align 1 +@struct2_foo5 = local_unnamed_addr global %Foo5 { i32 1, [12 x i8] undef, i8 2, [15 x i8] undef }, align 16 +@struct2_foo6 = local_unnamed_addr global %Foo6 { i32 1, i16 2, i16 3 }, align 1 -define i32 @struct2.test5(i8 signext %0) #0 { +define i32 @struct2_test5(i8 signext %0) #0 { entry: %y = alloca %Foo5, align 16 call void @llvm.memset.p0.i64(ptr align 16 %y, i8 0, i64 32, i1 false) @@ -98,4 +98,4 @@ entry: %5 = load i32, ptr %4, align 16 %add = add i32 %sisiext, %5 ret i32 %add -} \ No newline at end of file +} diff --git a/test/test_suite2/subarrays/slice_comparison.c3t b/test/test_suite2/subarrays/slice_comparison.c3t index 017abab2c..b7e4b5d72 100644 --- a/test/test_suite2/subarrays/slice_comparison.c3t +++ b/test/test_suite2/subarrays/slice_comparison.c3t @@ -34,7 +34,7 @@ fn void main() /* #expect: mymodule.ll -define void @mymodule.main() #0 { +define void @mymodule_main() #0 { entry: %y = alloca %"char[]", align 8 %z = alloca %"char[]", align 8 diff --git a/test/test_suite2/subarrays/slice_offset.c3t b/test/test_suite2/subarrays/slice_offset.c3t index 37c881979..5f5a740fd 100644 --- a/test/test_suite2/subarrays/slice_offset.c3t +++ b/test/test_suite2/subarrays/slice_offset.c3t @@ -6,7 +6,7 @@ fn void test() /* #expect: slice_offset.ll -define void @slice_offset.test() #0 { +define void @slice_offset_test() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca %"int[]", align 8 diff --git a/test/test_suite2/subarrays/slice_offset_neg_end.c3t b/test/test_suite2/subarrays/slice_offset_neg_end.c3t index b7592bb09..a3f8657e1 100644 --- a/test/test_suite2/subarrays/slice_offset_neg_end.c3t +++ b/test/test_suite2/subarrays/slice_offset_neg_end.c3t @@ -7,7 +7,7 @@ fn void test() /* #expect: slice_offset_neg_end.ll -define void @slice_offset_neg_end.test() #0 { +define void @slice_offset_neg_end_test() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca %"int[]", align 8 diff --git a/test/test_suite2/subarrays/slice_offset_neg_start.c3t b/test/test_suite2/subarrays/slice_offset_neg_start.c3t index cc03293be..eb0a54489 100644 --- a/test/test_suite2/subarrays/slice_offset_neg_start.c3t +++ b/test/test_suite2/subarrays/slice_offset_neg_start.c3t @@ -6,7 +6,7 @@ fn void test() /* #expect: slice_offset_neg_start.ll -define void @slice_offset_neg_start.test() #0 { +define void @slice_offset_neg_start_test() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca %"int[]", align 8 diff --git a/test/test_suite2/subarrays/slice_start.c3t b/test/test_suite2/subarrays/slice_start.c3t index c81549952..de9aa96a5 100644 --- a/test/test_suite2/subarrays/slice_start.c3t +++ b/test/test_suite2/subarrays/slice_start.c3t @@ -6,7 +6,7 @@ fn void test() /* #expect: slice_start.ll -define void @slice_start.test() #0 { +define void @slice_start_test() #0 { entry: %x = alloca [3 x i32], align 4 %y = alloca %"int[]", align 8 diff --git a/test/test_suite2/union/union_codegen_const.c3t b/test/test_suite2/union/union_codegen_const.c3t index a211ff248..60582734b 100644 --- a/test/test_suite2/union/union_codegen_const.c3t +++ b/test/test_suite2/union/union_codegen_const.c3t @@ -13,8 +13,8 @@ Foo i = { .b = 2.3, .a = 23 }; // #expect: test.ll -@test.f = protected unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 -@test.g = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 -@test.h = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 -@test.i = local_unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 +@test_f = protected unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 +@test_g = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 +@test_h = protected unnamed_addr global %Foo { double 2.300000e+00 }, align 8 +@test_i = local_unnamed_addr global { i32, [4 x i8] } { i32 23, [4 x i8] undef }, align 8 diff --git a/test/test_suite2/union/union_codegen_empty.c3t b/test/test_suite2/union/union_codegen_empty.c3t index bd460b762..7acc48b84 100644 --- a/test/test_suite2/union/union_codegen_empty.c3t +++ b/test/test_suite2/union/union_codegen_empty.c3t @@ -26,7 +26,7 @@ fn void test() /* #expect: union_codegen_empty.ll source_filena -define void @union_codegen_empty.test() #0 { +define void @union_codegen_empty_test() #0 { entry: %a = alloca %UnionA, align 4 %a2 = alloca %UnionA, align 4 diff --git a/test/test_suite2/union/union_codegen_overwrite_call.c3t b/test/test_suite2/union/union_codegen_overwrite_call.c3t index 305840dc5..25a5bf02c 100644 --- a/test/test_suite2/union/union_codegen_overwrite_call.c3t +++ b/test/test_suite2/union/union_codegen_overwrite_call.c3t @@ -19,7 +19,7 @@ fn void test() /* #expect: test.ll -define void @test.test() #0 { +define void @test_test() #0 { entry: %b = alloca %UnionB, align 8 %0 = call i32 @bar() diff --git a/test/test_suite2/union/union_in_struct.c3t b/test/test_suite2/union/union_in_struct.c3t index 64b09b4d8..5fb0cd4c5 100644 --- a/test/test_suite2/union/union_in_struct.c3t +++ b/test/test_suite2/union/union_in_struct.c3t @@ -37,9 +37,9 @@ fn void test(Blend_Map_Entry* foo) %Blend_Map_Entry = type { %vals } %vals = type { [2 x double], [8 x i8] } -@test.foo1 = local_unnamed_addr global { i8, [4 x i8], { i32, [4 x i8] }, i32 } { i8 0, [4 x i8] undef, { i32, [4 x i8] } { i32 3, [4 x i8] undef }, i32 4 }, align 8 -@test.foo2 = local_unnamed_addr global %Foo { i8 0, %anon { double 3.000000e+00 }, i32 4 }, align 8 -@test.a = local_unnamed_addr 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 = local_unnamed_addr global %Blend_Map_Entry { %vals { [2 x double] [double 6.000000e+00, double 7.000000e+00], [8 x i8] undef } }, align 8 -@test.c = local_unnamed_addr 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 = local_unnamed_addr 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_foo1 = local_unnamed_addr global { i8, [4 x i8], { i32, [4 x i8] }, i32 } { i8 0, [4 x i8] undef, { i32, [4 x i8] } { i32 3, [4 x i8] undef }, i32 4 }, align 8 +@test_foo2 = local_unnamed_addr global %Foo { i8 0, %anon { double 3.000000e+00 }, i32 4 }, align 8 +@test_a = local_unnamed_addr 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 = local_unnamed_addr global %Blend_Map_Entry { %vals { [2 x double] [double 6.000000e+00, double 7.000000e+00], [8 x i8] undef } }, align 8 +@test_c = local_unnamed_addr 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 = local_unnamed_addr 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 diff --git a/test/test_suite2/variant/variant_assign.c3t b/test/test_suite2/variant/variant_assign.c3t index 1136ba73c..109064770 100644 --- a/test/test_suite2/variant/variant_assign.c3t +++ b/test/test_suite2/variant/variant_assign.c3t @@ -58,11 +58,11 @@ fn int main() /* #expect: foo.ll -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 -@.typeid.double = linkonce constant { i8, i16 } { i8 4, i16 64 }, align 2 -@.typeid.bool = linkonce constant { i8 } { i8 1 }, align 1 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$double" = linkonce constant %.introspect { i8 4, i64 8, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$bool" = linkonce constant %.introspect { i8 1, i64 1, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test(i64 %0, ptr %1) #0 { +define void @foo_test(i64 %0, ptr %1) #0 { entry: %z = alloca %variant, align 8 %switch = alloca i64, align 8 @@ -79,7 +79,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (ptr @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -92,7 +92,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq2 = icmp eq i64 ptrtoint (ptr @.typeid.double to i64), %6 + %eq2 = icmp eq i64 ptrtoint (ptr @"ct$double" to i64), %6 br i1 %eq2, label %switch.case3, label %next_if5 switch.case3: ; preds = %next_if @@ -115,7 +115,7 @@ switch.exit: ; preds = %switch.default, %sw ret void } -define void @foo.test2(i64 %0, ptr %1) #0 { +define void @foo_test2(i64 %0, ptr %1) #0 { entry: %y = alloca %variant, align 8 %anon = alloca %variant, align 8 @@ -135,7 +135,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (ptr @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -144,7 +144,7 @@ switch.case: ; preds = %switch.entry store ptr %8, ptr %z, align 8 store i32 12, ptr %taddr, align 4 %9 = insertvalue %variant undef, ptr %taddr, 0 - %10 = insertvalue %variant %9, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %10 = insertvalue %variant %9, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %10, ptr %y, align 8 %11 = load ptr, ptr %z, align 8 %12 = load i32, ptr %11, align 8 @@ -152,7 +152,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint (ptr @.typeid.double to i64), %6 + %eq1 = icmp eq i64 ptrtoint (ptr @"ct$double" to i64), %6 br i1 %eq1, label %switch.case2, label %next_if4 switch.case2: ; preds = %next_if @@ -175,7 +175,7 @@ switch.exit: ; preds = %switch.default, %sw ret void } -define void @foo.test3(i64 %0, ptr %1) #0 { +define void @foo_test3(i64 %0, ptr %1) #0 { entry: %y = alloca %variant, align 8 %anon = alloca %variant, align 8 @@ -194,7 +194,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (ptr @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -207,7 +207,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint (ptr @.typeid.double to i64), %6 + %eq1 = icmp eq i64 ptrtoint (ptr @"ct$double" to i64), %6 br i1 %eq1, label %switch.case2, label %next_if4 switch.case2: ; preds = %next_if @@ -252,84 +252,84 @@ entry: %taddr31 = alloca %variant, align 8 store double 1.230000e+02, ptr %taddr, align 8 %0 = insertvalue %variant undef, ptr %taddr, 0 - %1 = insertvalue %variant %0, i64 ptrtoint (ptr @.typeid.double to i64), 1 + %1 = insertvalue %variant %0, i64 ptrtoint (ptr @"ct$double" to i64), 1 store %variant %1, ptr %taddr1, align 8 %2 = getelementptr inbounds { i64, ptr }, ptr %taddr1, i32 0, i32 0 %lo = load i64, ptr %2, align 8 %3 = getelementptr inbounds { i64, ptr }, ptr %taddr1, i32 0, i32 1 %hi = load ptr, ptr %3, align 8 - call void @foo.test(i64 %lo, ptr %hi) + call void @foo_test(i64 %lo, ptr %hi) store i32 1, ptr %taddr2, align 4 %4 = insertvalue %variant undef, ptr %taddr2, 0 - %5 = insertvalue %variant %4, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %5 = insertvalue %variant %4, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %5, ptr %taddr3, align 8 %6 = getelementptr inbounds { i64, ptr }, ptr %taddr3, i32 0, i32 0 %lo4 = load i64, ptr %6, align 8 %7 = getelementptr inbounds { i64, ptr }, ptr %taddr3, i32 0, i32 1 %hi5 = load ptr, ptr %7, align 8 - call void @foo.test(i64 %lo4, ptr %hi5) + call void @foo_test(i64 %lo4, ptr %hi5) store i8 1, ptr %taddr6, align 1 %8 = insertvalue %variant undef, ptr %taddr6, 0 - %9 = insertvalue %variant %8, i64 ptrtoint (ptr @.typeid.bool to i64), 1 + %9 = insertvalue %variant %8, i64 ptrtoint (ptr @"ct$bool" to i64), 1 store %variant %9, ptr %taddr7, align 8 %10 = getelementptr inbounds { i64, ptr }, ptr %taddr7, i32 0, i32 0 %lo8 = load i64, ptr %10, align 8 %11 = getelementptr inbounds { i64, ptr }, ptr %taddr7, i32 0, i32 1 %hi9 = load ptr, ptr %11, align 8 - call void @foo.test(i64 %lo8, ptr %hi9) + call void @foo_test(i64 %lo8, ptr %hi9) store double 1.235000e+02, ptr %taddr10, align 8 %12 = insertvalue %variant undef, ptr %taddr10, 0 - %13 = insertvalue %variant %12, i64 ptrtoint (ptr @.typeid.double to i64), 1 + %13 = insertvalue %variant %12, i64 ptrtoint (ptr @"ct$double" to i64), 1 store %variant %13, ptr %taddr11, align 8 %14 = getelementptr inbounds { i64, ptr }, ptr %taddr11, i32 0, i32 0 %lo12 = load i64, ptr %14, align 8 %15 = getelementptr inbounds { i64, ptr }, ptr %taddr11, i32 0, i32 1 %hi13 = load ptr, ptr %15, align 8 - call void @foo.test2(i64 %lo12, ptr %hi13) + call void @foo_test2(i64 %lo12, ptr %hi13) store i32 1, ptr %taddr14, align 4 %16 = insertvalue %variant undef, ptr %taddr14, 0 - %17 = insertvalue %variant %16, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %17 = insertvalue %variant %16, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %17, ptr %taddr15, align 8 %18 = getelementptr inbounds { i64, ptr }, ptr %taddr15, i32 0, i32 0 %lo16 = load i64, ptr %18, align 8 %19 = getelementptr inbounds { i64, ptr }, ptr %taddr15, i32 0, i32 1 %hi17 = load ptr, ptr %19, align 8 - call void @foo.test2(i64 %lo16, ptr %hi17) + call void @foo_test2(i64 %lo16, ptr %hi17) store i8 1, ptr %taddr18, align 1 %20 = insertvalue %variant undef, ptr %taddr18, 0 - %21 = insertvalue %variant %20, i64 ptrtoint (ptr @.typeid.bool to i64), 1 + %21 = insertvalue %variant %20, i64 ptrtoint (ptr @"ct$bool" to i64), 1 store %variant %21, ptr %taddr19, align 8 %22 = getelementptr inbounds { i64, ptr }, ptr %taddr19, i32 0, i32 0 %lo20 = load i64, ptr %22, align 8 %23 = getelementptr inbounds { i64, ptr }, ptr %taddr19, i32 0, i32 1 %hi21 = load ptr, ptr %23, align 8 - call void @foo.test2(i64 %lo20, ptr %hi21) + call void @foo_test2(i64 %lo20, ptr %hi21) store double 1.240000e+02, ptr %taddr22, align 8 %24 = insertvalue %variant undef, ptr %taddr22, 0 - %25 = insertvalue %variant %24, i64 ptrtoint (ptr @.typeid.double to i64), 1 + %25 = insertvalue %variant %24, i64 ptrtoint (ptr @"ct$double" to i64), 1 store %variant %25, ptr %taddr23, align 8 %26 = getelementptr inbounds { i64, ptr }, ptr %taddr23, i32 0, i32 0 %lo24 = load i64, ptr %26, align 8 %27 = getelementptr inbounds { i64, ptr }, ptr %taddr23, i32 0, i32 1 %hi25 = load ptr, ptr %27, align 8 - call void @foo.test3(i64 %lo24, ptr %hi25) + call void @foo_test3(i64 %lo24, ptr %hi25) store i32 2, ptr %taddr26, align 4 %28 = insertvalue %variant undef, ptr %taddr26, 0 - %29 = insertvalue %variant %28, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %29 = insertvalue %variant %28, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %29, ptr %taddr27, align 8 %30 = getelementptr inbounds { i64, ptr }, ptr %taddr27, i32 0, i32 0 %lo28 = load i64, ptr %30, align 8 %31 = getelementptr inbounds { i64, ptr }, ptr %taddr27, i32 0, i32 1 %hi29 = load ptr, ptr %31, align 8 - call void @foo.test3(i64 %lo28, ptr %hi29) + call void @foo_test3(i64 %lo28, ptr %hi29) store i8 1, ptr %taddr30, align 1 %32 = insertvalue %variant undef, ptr %taddr30, 0 - %33 = insertvalue %variant %32, i64 ptrtoint (ptr @.typeid.bool to i64), 1 + %33 = insertvalue %variant %32, i64 ptrtoint (ptr @"ct$bool" to i64), 1 store %variant %33, ptr %taddr31, align 8 %34 = getelementptr inbounds { i64, ptr }, ptr %taddr31, i32 0, i32 0 %lo32 = load i64, ptr %34, align 8 %35 = getelementptr inbounds { i64, ptr }, ptr %taddr31, i32 0, i32 1 %hi33 = load ptr, ptr %35, align 8 - call void @foo.test3(i64 %lo32, ptr %hi33) + call void @foo_test3(i64 %lo32, ptr %hi33) ret i32 0 } diff --git a/test/test_suite2/variant/variant_switch.c3t b/test/test_suite2/variant/variant_switch.c3t index d680bd3d6..fdfd3c94c 100644 --- a/test/test_suite2/variant/variant_switch.c3t +++ b/test/test_suite2/variant/variant_switch.c3t @@ -30,11 +30,11 @@ fn int main() /* #expect: foo.ll -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 -@.typeid.double = linkonce constant { i8, i16 } { i8 4, i16 64 }, align 2 -@.typeid.bool = linkonce constant { i8 } { i8 1 }, align 1 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$double" = linkonce constant %.introspect { i8 4, i64 8, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$bool" = linkonce constant %.introspect { i8 1, i64 1, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test(i64 %0, ptr %1) #0 { +define void @foo_test(i64 %0, ptr %1) #0 { entry: %z = alloca %variant, align 8 %switch = alloca i64, align 8 @@ -51,7 +51,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (ptr @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -66,7 +66,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq2 = icmp eq i64 ptrtoint (ptr @.typeid.double to i64), %6 + %eq2 = icmp eq i64 ptrtoint (ptr @"ct$double" to i64), %6 br i1 %eq2, label %switch.case3, label %next_if5 switch.case3: ; preds = %next_if @@ -88,7 +88,7 @@ switch.default: ; preds = %next_if5 switch.exit: ; preds = %switch.default, %switch.case3, %switch.case %16 = getelementptr inbounds %variant, ptr %z, i32 0, i32 1 %17 = load i64, ptr %16, align 8 - %eq6 = icmp eq i64 %17, ptrtoint (ptr @.typeid.int to i64) + %eq6 = icmp eq i64 %17, ptrtoint (ptr @"ct$int" to i64) br i1 %eq6, label %if.then, label %if.exit if.then: ; preds = %switch.exit @@ -113,30 +113,30 @@ entry: %taddr7 = alloca %variant, align 8 store double 1.230000e+02, ptr %taddr, align 8 %0 = insertvalue %variant undef, ptr %taddr, 0 - %1 = insertvalue %variant %0, i64 ptrtoint (ptr @.typeid.double to i64), 1 + %1 = insertvalue %variant %0, i64 ptrtoint (ptr @"ct$double" to i64), 1 store %variant %1, ptr %taddr1, align 8 %2 = getelementptr inbounds { i64, ptr }, ptr %taddr1, i32 0, i32 0 %lo = load i64, ptr %2, align 8 %3 = getelementptr inbounds { i64, ptr }, ptr %taddr1, i32 0, i32 1 %hi = load ptr, ptr %3, align 8 - call void @foo.test(i64 %lo, ptr %hi) + call void @foo_test(i64 %lo, ptr %hi) store i32 1, ptr %taddr2, align 4 %4 = insertvalue %variant undef, ptr %taddr2, 0 - %5 = insertvalue %variant %4, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %5 = insertvalue %variant %4, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %5, ptr %taddr3, align 8 %6 = getelementptr inbounds { i64, ptr }, ptr %taddr3, i32 0, i32 0 %lo4 = load i64, ptr %6, align 8 %7 = getelementptr inbounds { i64, ptr }, ptr %taddr3, i32 0, i32 1 %hi5 = load ptr, ptr %7, align 8 - call void @foo.test(i64 %lo4, ptr %hi5) + call void @foo_test(i64 %lo4, ptr %hi5) store i8 1, ptr %taddr6, align 1 %8 = insertvalue %variant undef, ptr %taddr6, 0 - %9 = insertvalue %variant %8, i64 ptrtoint (ptr @.typeid.bool to i64), 1 + %9 = insertvalue %variant %8, i64 ptrtoint (ptr @"ct$bool" to i64), 1 store %variant %9, ptr %taddr7, align 8 %10 = getelementptr inbounds { i64, ptr }, ptr %taddr7, i32 0, i32 0 %lo8 = load i64, ptr %10, align 8 %11 = getelementptr inbounds { i64, ptr }, ptr %taddr7, i32 0, i32 1 %hi9 = load ptr, ptr %11, align 8 - call void @foo.test(i64 %lo8, ptr %hi9) + call void @foo_test(i64 %lo8, ptr %hi9) ret i32 0 } diff --git a/test/test_suite2/variant/variant_test.c3t b/test/test_suite2/variant/variant_test.c3t index e5a556b50..14348368f 100644 --- a/test/test_suite2/variant/variant_test.c3t +++ b/test/test_suite2/variant/variant_test.c3t @@ -63,17 +63,16 @@ fn void main() /* #expect: foo.ll - %variant = type { ptr, i64 } %"variant[]" = type { ptr, i64 } -@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2 -@.typeid.double = linkonce constant { i8, i16 } { i8 4, i16 64 }, align 2 -@.typeid.variant = linkonce constant { i8 } { i8 7 }, align 1 -@".typeid.int*" = linkonce constant { i8, i64 } { i8 19, i64 ptrtoint (ptr @.typeid.int to i64) }, align 8 -@.typeid.bool = linkonce constant { i8 } { i8 1 }, align 1 +@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$double" = linkonce constant %.introspect { i8 4, i64 8, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$variant" = linkonce constant %.introspect { i8 7, i64 16, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$p$int" = linkonce constant %.introspect { i8 19, i64 8, i64 ptrtoint (ptr @"ct$int" to i64), i64 0, [0 x i64] zeroinitializer }, align 8 +@"ct$bool" = linkonce constant %.introspect { i8 1, i64 1, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8 -define void @foo.test(i64 %0, ptr %1) #0 { +define void @foo_test(i64 %0, ptr %1) #0 { entry: %x = alloca %variant, align 8 %switch = alloca i64, align 8 @@ -88,7 +87,7 @@ entry: switch.entry: ; preds = %entry %6 = load i64, ptr %switch, align 8 - %eq = icmp eq i64 ptrtoint (ptr @.typeid.int to i64), %6 + %eq = icmp eq i64 ptrtoint (ptr @"ct$int" to i64), %6 br i1 %eq, label %switch.case, label %next_if switch.case: ; preds = %switch.entry @@ -96,7 +95,7 @@ switch.case: ; preds = %switch.entry br label %switch.exit next_if: ; preds = %switch.entry - %eq1 = icmp eq i64 ptrtoint (ptr @.typeid.double to i64), %6 + %eq1 = icmp eq i64 ptrtoint (ptr @"ct$double" to i64), %6 br i1 %eq1, label %switch.case2, label %next_if3 switch.case2: ; preds = %next_if @@ -104,7 +103,7 @@ switch.case2: ; preds = %next_if br label %switch.exit next_if3: ; preds = %next_if - %eq4 = icmp eq i64 ptrtoint (ptr @.typeid.variant to i64), %6 + %eq4 = icmp eq i64 ptrtoint (ptr @"ct$variant" to i64), %6 br i1 %eq4, label %switch.case5, label %next_if6 switch.case5: ; preds = %next_if3 @@ -112,7 +111,7 @@ switch.case5: ; preds = %next_if3 br label %switch.exit next_if6: ; preds = %next_if3 - %eq7 = icmp eq i64 ptrtoint (ptr @".typeid.int*" to i64), %6 + %eq7 = icmp eq i64 ptrtoint (ptr @"ct$p$int" to i64), %6 br i1 %eq7, label %switch.case8, label %next_if9 switch.case8: ; preds = %next_if6 @@ -131,7 +130,7 @@ switch.exit: ; preds = %switch.default, %sw } ; Function Attrs: nounwind -define void @foo.test_all(ptr %0, i64 %1) #0 { +define void @foo_test_all(ptr %0, i64 %1) #0 { entry: %y = alloca %"variant[]", align 8 %anon = alloca i64, align 8 @@ -163,7 +162,7 @@ loop.body: ; preds = %loop.cond %lo = load i64, ptr %11, align 8 %12 = getelementptr inbounds { i64, ptr }, ptr %element, i32 0, i32 1 %hi = load ptr, ptr %12, align 8 - call void @foo.test(i64 %lo, ptr %hi) + call void @foo_test(i64 %lo, ptr %hi) %13 = load i64, ptr %anon, align 8 %add = add i64 %13, 1 store i64 %add, ptr %anon, align 8 @@ -174,7 +173,7 @@ loop.exit: ; preds = %loop.cond } ; Function Attrs: nounwind -define void @foo.main() #0 { +define void @foo_main() #0 { entry: %x = alloca %variant, align 8 %taddr = alloca i32, align 4 @@ -195,11 +194,11 @@ entry: %taddr23 = alloca double, align 8 store i32 1, ptr %taddr, align 4 %0 = insertvalue %variant undef, ptr %taddr, 0 - %1 = insertvalue %variant %0, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %1 = insertvalue %variant %0, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %1, ptr %x, align 8 store i32 0, ptr %z, align 4 %2 = insertvalue %variant undef, ptr %z, 0 - %3 = insertvalue %variant %2, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %3 = insertvalue %variant %2, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %3, ptr %y, align 8 %4 = getelementptr inbounds %variant, ptr %y, i32 0, i32 1 %5 = load i64, ptr %4, align 8 @@ -209,7 +208,7 @@ entry: store i64 %7, ptr %h, align 8 %8 = getelementptr inbounds %variant, ptr %y, i32 0, i32 1 %9 = load i64, ptr %8, align 8 - %eq = icmp eq i64 %9, ptrtoint (ptr @.typeid.int to i64) + %eq = icmp eq i64 %9, ptrtoint (ptr @"ct$int" to i64) br i1 %eq, label %if.then, label %if.exit if.then: ; preds = %entry @@ -219,7 +218,7 @@ if.then: ; preds = %entry if.exit: ; preds = %if.then, %entry %10 = getelementptr inbounds %variant, ptr %x, i32 0, i32 1 %11 = load i64, ptr %10, align 8 - %eq1 = icmp eq i64 %11, ptrtoint (ptr @.typeid.int to i64) + %eq1 = icmp eq i64 %11, ptrtoint (ptr @"ct$int" to i64) br i1 %eq1, label %if.then2, label %if.exit3 if.then2: ; preds = %if.exit @@ -229,14 +228,14 @@ if.then2: ; preds = %if.exit if.exit3: ; preds = %if.then2, %if.exit store double 1.000000e+00, ptr %taddr4, align 8 %12 = insertvalue %variant undef, ptr %taddr4, 0 - %13 = insertvalue %variant %12, i64 ptrtoint (ptr @.typeid.double to i64), 1 + %13 = insertvalue %variant %12, i64 ptrtoint (ptr @"ct$double" to i64), 1 store %variant %13, ptr %y, align 8 %14 = insertvalue %variant undef, ptr %x, 0 - %15 = insertvalue %variant %14, i64 ptrtoint (ptr @.typeid.variant to i64), 1 + %15 = insertvalue %variant %14, i64 ptrtoint (ptr @"ct$variant" to i64), 1 store %variant %15, ptr %x, align 8 %16 = getelementptr inbounds %variant, ptr %y, i32 0, i32 1 %17 = load i64, ptr %16, align 8 - %eq5 = icmp eq i64 %17, ptrtoint (ptr @.typeid.int to i64) + %eq5 = icmp eq i64 %17, ptrtoint (ptr @"ct$int" to i64) br i1 %eq5, label %if.then6, label %if.exit7 if.then6: ; preds = %if.exit3 @@ -246,7 +245,7 @@ if.then6: ; preds = %if.exit3 if.exit7: ; preds = %if.then6, %if.exit3 %18 = getelementptr inbounds %variant, ptr %x, i32 0, i32 1 %19 = load i64, ptr %18, align 8 - %eq8 = icmp eq i64 %19, ptrtoint (ptr @.typeid.int to i64) + %eq8 = icmp eq i64 %19, ptrtoint (ptr @"ct$int" to i64) br i1 %eq8, label %if.then9, label %if.exit10 if.then9: ; preds = %if.exit7 @@ -258,34 +257,34 @@ if.exit10: ; preds = %if.then9, %if.exit7 %lo = load i64, ptr %20, align 8 %21 = getelementptr inbounds { i64, ptr }, ptr %x, i32 0, i32 1 %hi = load ptr, ptr %21, align 8 - call void @foo.test(i64 %lo, ptr %hi) + call void @foo_test(i64 %lo, ptr %hi) store double 1.000000e+00, ptr %taddr11, align 8 %22 = insertvalue %variant undef, ptr %taddr11, 0 - %23 = insertvalue %variant %22, i64 ptrtoint (ptr @.typeid.double to i64), 1 + %23 = insertvalue %variant %22, i64 ptrtoint (ptr @"ct$double" to i64), 1 store %variant %23, ptr %taddr12, align 8 %24 = getelementptr inbounds { i64, ptr }, ptr %taddr12, i32 0, i32 0 %lo13 = load i64, ptr %24, align 8 %25 = getelementptr inbounds { i64, ptr }, ptr %taddr12, i32 0, i32 1 %hi14 = load ptr, ptr %25, align 8 - call void @foo.test(i64 %lo13, ptr %hi14) + call void @foo_test(i64 %lo13, ptr %hi14) store i32 1, ptr %taddr15, align 4 %26 = insertvalue %variant undef, ptr %taddr15, 0 - %27 = insertvalue %variant %26, i64 ptrtoint (ptr @.typeid.int to i64), 1 + %27 = insertvalue %variant %26, i64 ptrtoint (ptr @"ct$int" to i64), 1 store %variant %27, ptr %taddr16, align 8 %28 = getelementptr inbounds { i64, ptr }, ptr %taddr16, i32 0, i32 0 %lo17 = load i64, ptr %28, align 8 %29 = getelementptr inbounds { i64, ptr }, ptr %taddr16, i32 0, i32 1 %hi18 = load ptr, ptr %29, align 8 - call void @foo.test(i64 %lo17, ptr %hi18) + call void @foo_test(i64 %lo17, ptr %hi18) store i8 1, ptr %taddr19, align 1 %30 = insertvalue %variant undef, ptr %taddr19, 0 - %31 = insertvalue %variant %30, i64 ptrtoint (ptr @.typeid.bool to i64), 1 + %31 = insertvalue %variant %30, i64 ptrtoint (ptr @"ct$bool" to i64), 1 store %variant %31, ptr %taddr20, align 8 %32 = getelementptr inbounds { i64, ptr }, ptr %taddr20, i32 0, i32 0 %lo21 = load i64, ptr %32, align 8 %33 = getelementptr inbounds { i64, ptr }, ptr %taddr20, i32 0, i32 1 %hi22 = load ptr, ptr %33, align 8 - call void @foo.test(i64 %lo21, ptr %hi22) + call void @foo_test(i64 %lo21, ptr %hi22) call void (ptr, ...) @printf(ptr @.str.9) store ptr null, ptr %df, align 8 %34 = getelementptr inbounds [5 x %variant], ptr %varargslots, i64 0, i64 0 @@ -294,15 +293,15 @@ if.exit10: ; preds = %if.then9, %if.exit7 call void @llvm.memcpy.p0.p0.i32(ptr align 16 %35, ptr align 8 %x, i32 16, i1 false) store double 1.000000e+00, ptr %taddr23, align 8 %36 = insertvalue %variant undef, ptr %taddr23, 0 - %37 = insertvalue %variant %36, i64 ptrtoint (ptr @.typeid.double to i64), 1 + %37 = insertvalue %variant %36, i64 ptrtoint (ptr @"ct$double" to i64), 1 %38 = getelementptr inbounds [5 x %variant], ptr %varargslots, i64 0, i64 2 store %variant %37, ptr %38, align 16 %39 = insertvalue %variant undef, ptr %x, 0 - %40 = insertvalue %variant %39, i64 ptrtoint (ptr @.typeid.variant to i64), 1 + %40 = insertvalue %variant %39, i64 ptrtoint (ptr @"ct$variant" to i64), 1 %41 = getelementptr inbounds [5 x %variant], ptr %varargslots, i64 0, i64 3 store %variant %40, ptr %41, align 16 %42 = insertvalue %variant undef, ptr %df, 0 - %43 = insertvalue %variant %42, i64 ptrtoint (ptr @".typeid.int*" to i64), 1 + %43 = insertvalue %variant %42, i64 ptrtoint (ptr @"ct$p$int" to i64), 1 %44 = getelementptr inbounds [5 x %variant], ptr %varargslots, i64 0, i64 4 store %variant %43, ptr %44, align 16 %45 = getelementptr inbounds %"variant[]", ptr %vararg, i32 0, i32 1 @@ -313,6 +312,6 @@ if.exit10: ; preds = %if.then9, %if.exit7 %lo24 = load ptr, ptr %47, align 8 %48 = getelementptr inbounds { ptr, i64 }, ptr %vararg, i32 0, i32 1 %hi25 = load i64, ptr %48, align 8 - call void @foo.test_all(ptr %lo24, i64 %hi25) + call void @foo_test_all(ptr %lo24, i64 %hi25) ret void } diff --git a/test/test_suite2/vector/vector_bit.c3t b/test/test_suite2/vector/vector_bit.c3t index ef981dce7..6727d6eda 100644 --- a/test/test_suite2/vector/vector_bit.c3t +++ b/test/test_suite2/vector/vector_bit.c3t @@ -38,7 +38,7 @@ fn void main() /* #expect: vector_bit.ll -define void @vector_bit.testf() #0 { +define void @vector_bit_testf() #0 { entry: %y = alloca <4 x float>, align 16 %w = alloca <4 x i32>, align 16 @@ -60,7 +60,7 @@ entry: } ; Function Attrs: nounwind -define void @vector_bit.testi() #0 { +define void @vector_bit_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 diff --git a/test/test_suite2/vector/vector_incdec.c3t b/test/test_suite2/vector/vector_incdec.c3t index c9bd25e1e..0b083468c 100644 --- a/test/test_suite2/vector/vector_incdec.c3t +++ b/test/test_suite2/vector/vector_incdec.c3t @@ -38,7 +38,7 @@ fn void main() /* #expect: vector_incdec.ll -define void @vector_incdec.testf() #0 { +define void @vector_incdec_testf() #0 { entry: %y = alloca <4 x float>, align 16 %z = alloca <4 x float>, align 16 @@ -113,7 +113,7 @@ entry: } ; Function Attrs: nounwind -define void @vector_incdec.testi() #0 { +define void @vector_incdec_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 @@ -182,9 +182,9 @@ entry: ret void } -define void @vector_incdec.main() #0 { +define void @vector_incdec_main() #0 { entry: - call void @vector_incdec.testf() - call void @vector_incdec.testi() + call void @vector_incdec_testf() + call void @vector_incdec_testi() ret void } diff --git a/test/test_suite2/vector/vector_init.c3t b/test/test_suite2/vector/vector_init.c3t index 402fbd9bc..04ab6c6e8 100644 --- a/test/test_suite2/vector/vector_init.c3t +++ b/test/test_suite2/vector/vector_init.c3t @@ -14,10 +14,10 @@ fn void main() /* #expect: vector_init.ll -@vector_init.baz = local_unnamed_addr global <4 x i32> , align 16 +@vector_init_baz = local_unnamed_addr global <4 x i32> , align 16 ; Function Attrs: nounwind -define void @vector_init.main() #0 { +define void @vector_init_main() #0 { entry: %foo = alloca <4 x i32>, align 16 %z = alloca i32, align 4 diff --git a/test/test_suite2/vector/vector_ops.c3t b/test/test_suite2/vector/vector_ops.c3t index 4af717e95..d9a445907 100644 --- a/test/test_suite2/vector/vector_ops.c3t +++ b/test/test_suite2/vector/vector_ops.c3t @@ -98,7 +98,7 @@ fn void main() /* #expect: vector_ops.ll ; Function Attrs: nounwind -define void @vector_ops.testf() #0 { +define void @vector_ops_testf() #0 { entry: %y = alloca <4 x float>, align 16 %z = alloca <4 x float>, align 16 @@ -262,7 +262,7 @@ entry: } -define void @vector_ops.testb() #0 { +define void @vector_ops_testb() #0 { entry: %y = alloca <4 x i8>, align 4 %z = alloca <4 x i8>, align 4 @@ -381,7 +381,7 @@ entry: } ; Function Attrs: nounwind -define void @vector_ops.testi() #0 { +define void @vector_ops_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 diff --git a/test/test_suite2/vector/vector_ops2.c3t b/test/test_suite2/vector/vector_ops2.c3t index 6d280827a..9e353746c 100644 --- a/test/test_suite2/vector/vector_ops2.c3t +++ b/test/test_suite2/vector/vector_ops2.c3t @@ -99,7 +99,7 @@ fn void main() /* #expect: test.ll -define void @test.testf() #0 { +define void @test_testf() #0 { entry: %y = alloca <4 x float>, align 16 %z = alloca <4 x float>, align 16 @@ -149,7 +149,7 @@ entry: br i1 %zero, label %panic, label %checkok panic: ; preds = %entry - call void @"std::core::builtin.panic"(ptr @.zstr, ptr @.zstr.2, ptr @.zstr.3, i32 12) + call void @std_core_builtin_panic(ptr @.zstr, ptr @.zstr.2, ptr @.zstr.3, i32 12) br label %checkok checkok: ; preds = %panic, %entry @@ -273,7 +273,7 @@ checkok: ; preds = %panic, %entry } ; Function Attrs: nounwind -define void @test.testb() #0 { +define void @test_testb() #0 { entry: %y = alloca <4 x i8>, align 4 %z = alloca <4 x i8>, align 4 @@ -392,7 +392,7 @@ entry: } ; Function Attrs: nounwind -define void @test.testi() #0 { +define void @test_testi() #0 { entry: %y = alloca <4 x i32>, align 16 %z = alloca <4 x i32>, align 16 @@ -433,7 +433,7 @@ entry: br i1 %zero, label %panic, label %checkok panic: ; preds = %entry - call void @"std::core::builtin.panic"(ptr @.zstr.20, ptr @.zstr.21, ptr @.zstr.22, i32 56) + call void @std_core_builtin_panic(ptr @.zstr.20, ptr @.zstr.21, ptr @.zstr.22, i32 56) br label %checkok checkok: ; preds = %panic, %entry @@ -468,7 +468,7 @@ checkok: ; preds = %panic, %entry br i1 %shift_underflow, label %panic1, label %checkok2 panic1: ; preds = %checkok - call void @"std::core::builtin.panic"(ptr @.zstr.25, ptr @.zstr.26, ptr @.zstr.27, i32 60) + call void @std_core_builtin_panic(ptr @.zstr.25, ptr @.zstr.26, ptr @.zstr.27, i32 60) br label %checkok2 checkok2: ; preds = %panic1, %checkok @@ -477,7 +477,7 @@ checkok2: ; preds = %panic1, %checkok br i1 %shift_exceeds, label %panic3, label %checkok4 panic3: ; preds = %checkok2 - call void @"std::core::builtin.panic"(ptr @.zstr.28, ptr @.zstr.29, ptr @.zstr.30, i32 60) + call void @std_core_builtin_panic(ptr @.zstr.28, ptr @.zstr.29, ptr @.zstr.30, i32 60) br label %checkok4 checkok4: ; preds = %panic3, %checkok2 @@ -500,7 +500,7 @@ checkok4: ; preds = %panic3, %checkok2 br i1 %shift_underflow5, label %panic6, label %checkok7 panic6: ; preds = %checkok4 - call void @"std::core::builtin.panic"(ptr @.zstr.32, ptr @.zstr.33, ptr @.zstr.34, i32 62) + call void @std_core_builtin_panic(ptr @.zstr.32, ptr @.zstr.33, ptr @.zstr.34, i32 62) br label %checkok7 checkok7: ; preds = %panic6, %checkok4 @@ -509,7 +509,7 @@ checkok7: ; preds = %panic6, %checkok4 br i1 %shift_exceeds8, label %panic9, label %checkok10 panic9: ; preds = %checkok7 - call void @"std::core::builtin.panic"(ptr @.zstr.35, ptr @.zstr.36, ptr @.zstr.37, i32 62) + call void @std_core_builtin_panic(ptr @.zstr.35, ptr @.zstr.36, ptr @.zstr.37, i32 62) br label %checkok10 checkok10: ; preds = %panic9, %checkok7 diff --git a/test/test_suite2/vector/vector_to_array_cast.c3t b/test/test_suite2/vector/vector_to_array_cast.c3t index 03e226515..1d11f86f1 100644 --- a/test/test_suite2/vector/vector_to_array_cast.c3t +++ b/test/test_suite2/vector/vector_to_array_cast.c3t @@ -14,10 +14,10 @@ fn void tester() /* #expect: test.ll -@test.b = local_unnamed_addr global <2 x i32> , align 8 -@test.c = local_unnamed_addr global [2 x i32] [i32 1, i32 2], align 4 +@test_b = local_unnamed_addr global <2 x i32> , align 8 +@test_c = local_unnamed_addr global [2 x i32] [i32 1, i32 2], align 4 -define void @test.tester() #0 { +define void @test_tester() #0 { entry: %x = alloca <2 x i32>, align 8 %y = alloca [2 x i32], align 4