mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Missing check on optional left hand side for s.x. #1360
This commit is contained in:
@@ -72,6 +72,7 @@
|
|||||||
- Ordering issues with `$include` / `$exec` fixed #1302.
|
- Ordering issues with `$include` / `$exec` fixed #1302.
|
||||||
- Issues with wincrt linking.
|
- Issues with wincrt linking.
|
||||||
- Debug info with recursive canonical type usage could cause segfault.
|
- Debug info with recursive canonical type usage could cause segfault.
|
||||||
|
- Missing check on optional left hand side for `s.x`.
|
||||||
|
|
||||||
### Stdlib changes
|
### Stdlib changes
|
||||||
|
|
||||||
|
|||||||
@@ -472,7 +472,6 @@ static bool sema_binary_is_expr_lvalue(SemaContext *context, Expr *top_expr, Exp
|
|||||||
case EXPR_LAMBDA:
|
case EXPR_LAMBDA:
|
||||||
case EXPR_EMBED:
|
case EXPR_EMBED:
|
||||||
RETURN_SEMA_ERROR(expr, "This expression is a value and cannot be assigned to.");
|
RETURN_SEMA_ERROR(expr, "This expression is a value and cannot be assigned to.");
|
||||||
case EXPR_SUBSCRIPT_ASSIGN:
|
|
||||||
case EXPR_CT_IDENT:
|
case EXPR_CT_IDENT:
|
||||||
return true;
|
return true;
|
||||||
case EXPR_OTHER_CONTEXT:
|
case EXPR_OTHER_CONTEXT:
|
||||||
@@ -525,20 +524,19 @@ static bool sema_binary_is_expr_lvalue(SemaContext *context, Expr *top_expr, Exp
|
|||||||
return true;
|
return true;
|
||||||
case EXPR_BITACCESS:
|
case EXPR_BITACCESS:
|
||||||
case EXPR_ACCESS:
|
case EXPR_ACCESS:
|
||||||
return sema_binary_is_expr_lvalue(context, top_expr, expr->access_expr.parent);
|
if (!sema_binary_is_expr_lvalue(context, top_expr, expr->access_expr.parent)) return false;
|
||||||
|
goto CHECK_OPTIONAL;
|
||||||
case EXPR_SUBSCRIPT:
|
case EXPR_SUBSCRIPT:
|
||||||
case EXPR_SLICE:
|
case EXPR_SLICE:
|
||||||
|
case EXPR_SUBSCRIPT_ASSIGN:
|
||||||
case EXPR_SUBSCRIPT_ADDR:
|
case EXPR_SUBSCRIPT_ADDR:
|
||||||
if (IS_OPTIONAL(expr))
|
goto CHECK_OPTIONAL;
|
||||||
{
|
|
||||||
RETURN_SEMA_ERROR(top_expr, "You cannot assign to an optional value.");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
case EXPR_HASH_IDENT:
|
case EXPR_HASH_IDENT:
|
||||||
RETURN_SEMA_ERROR(top_expr, "You cannot assign to an unevaluated expression.");
|
RETURN_SEMA_ERROR(top_expr, "You cannot assign to an unevaluated expression.");
|
||||||
case EXPR_EXPRESSION_LIST:
|
case EXPR_EXPRESSION_LIST:
|
||||||
if (!vec_size(expr->expression_list)) return false;
|
if (!vec_size(expr->expression_list)) return false;
|
||||||
return sema_binary_is_expr_lvalue(context, top_expr, VECLAST(expr->expression_list));
|
return sema_binary_is_expr_lvalue(context, top_expr, VECLAST(expr->expression_list));
|
||||||
|
goto CHECK_OPTIONAL;
|
||||||
case EXPR_CONST:
|
case EXPR_CONST:
|
||||||
RETURN_SEMA_ERROR(top_expr, "You cannot assign to a constant expression.");
|
RETURN_SEMA_ERROR(top_expr, "You cannot assign to a constant expression.");
|
||||||
case EXPR_POISONED:
|
case EXPR_POISONED:
|
||||||
@@ -601,6 +599,13 @@ static bool sema_binary_is_expr_lvalue(SemaContext *context, Expr *top_expr, Exp
|
|||||||
ERR:
|
ERR:
|
||||||
SEMA_ERROR(top_expr, "An assignable expression, like a variable, was expected here.");
|
SEMA_ERROR(top_expr, "An assignable expression, like a variable, was expected here.");
|
||||||
return false;
|
return false;
|
||||||
|
CHECK_OPTIONAL:
|
||||||
|
if (IS_OPTIONAL(expr))
|
||||||
|
{
|
||||||
|
RETURN_SEMA_ERROR(top_expr, "You cannot assign to an optional value.");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool expr_may_ref(Expr *expr)
|
static bool expr_may_ref(Expr *expr)
|
||||||
|
|||||||
@@ -165,25 +165,25 @@ entry:
|
|||||||
store ptr %0, ptr %args, align 8
|
store ptr %0, ptr %args, align 8
|
||||||
%ptradd = getelementptr inbounds i8, ptr %args, i64 8
|
%ptradd = getelementptr inbounds i8, ptr %args, i64 8
|
||||||
store i64 %1, ptr %ptradd, align 8
|
store i64 %1, ptr %ptradd, align 8
|
||||||
!46
|
!47
|
||||||
!48
|
!49
|
||||||
%2 = call { i32, ptr } @attach.to_scope()
|
%2 = call { i32, ptr } @attach.to_scope()
|
||||||
store { i32, ptr } %2, ptr %result, align 8
|
store { i32, ptr } %2, ptr %result, align 8
|
||||||
%lo = load i32, ptr %result, align 8, !dbg !55
|
%lo = load i32, ptr %result, align 8, !dbg !56
|
||||||
%ptradd1 = getelementptr inbounds i8, ptr %result, i64 8, !dbg !55
|
%ptradd1 = getelementptr inbounds i8, ptr %result, i64 8, !dbg !56
|
||||||
%hi = load ptr, ptr %ptradd1, align 8, !dbg !55
|
%hi = load ptr, ptr %ptradd1, align 8, !dbg !56
|
||||||
%3 = call ptr @test.create_foo(i32 %lo, ptr %hi, i64 1, ptr null, i64 0), !dbg !57
|
%3 = call ptr @test.create_foo(i32 %lo, ptr %hi, i64 1, ptr null, i64 0), !dbg !58
|
||||||
store ptr %3, ptr %asdf, align 8, !dbg !57
|
store ptr %3, ptr %asdf, align 8, !dbg !58
|
||||||
%ptradd2 = getelementptr inbounds i8, ptr %args, i64 8, !dbg !58
|
%ptradd2 = getelementptr inbounds i8, ptr %args, i64 8, !dbg !59
|
||||||
%4 = load i64, ptr %ptradd2, align 8, !dbg !58
|
%4 = load i64, ptr %ptradd2, align 8, !dbg !59
|
||||||
%neq = icmp ne i64 0, %4, !dbg !58
|
%neq = icmp ne i64 0, %4, !dbg !59
|
||||||
%ternary = select i1 %neq, <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, !dbg !59
|
%ternary = select i1 %neq, <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, <4 x float> <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>, !dbg !60
|
||||||
%5 = call ptr @test.test(<4 x float> %ternary), !dbg !60
|
%5 = call ptr @test.test(<4 x float> %ternary), !dbg !61
|
||||||
%6 = call ptr @test.test2(), !dbg !61
|
%6 = call ptr @test.test2(), !dbg !62
|
||||||
ret i32 0, !dbg !62
|
ret i32 0, !dbg !63
|
||||||
}
|
}
|
||||||
|
|
||||||
define ptr @test.create_foo(i32 %0, ptr %1, i64 %2, ptr %3, i64 %4) #0 !dbg !63 {
|
define ptr @test.create_foo(i32 %0, ptr %1, i64 %2, ptr %3, i64 %4) #0 !dbg !64 {
|
||||||
entry:
|
entry:
|
||||||
%attach = alloca %Attach_Arg, align 8
|
%attach = alloca %Attach_Arg, align 8
|
||||||
%flags = alloca i64, align 8
|
%flags = alloca i64, align 8
|
||||||
@@ -191,18 +191,18 @@ entry:
|
|||||||
store i32 %0, ptr %attach, align 8
|
store i32 %0, ptr %attach, align 8
|
||||||
%ptradd = getelementptr inbounds i8, ptr %attach, i64 8
|
%ptradd = getelementptr inbounds i8, ptr %attach, i64 8
|
||||||
store ptr %1, ptr %ptradd, align 8
|
store ptr %1, ptr %ptradd, align 8
|
||||||
!66
|
!67
|
||||||
store i64 %2, ptr %flags, align 8
|
store i64 %2, ptr %flags, align 8
|
||||||
!68
|
!69
|
||||||
store ptr %3, ptr %name, align 8
|
store ptr %3, ptr %name, align 8
|
||||||
%ptradd1 = getelementptr inbounds i8, ptr %name, i64 8
|
%ptradd1 = getelementptr inbounds i8, ptr %name, i64 8
|
||||||
store i64 %4, ptr %ptradd1, align 8
|
store i64 %4, ptr %ptradd1, align 8
|
||||||
!70
|
!71
|
||||||
%5 = call ptr @std.core.mem.calloc(i64 8)
|
%5 = call ptr @std.core.mem.calloc(i64 8)
|
||||||
ret ptr %5, !dbg !72
|
ret ptr %5, !dbg !73
|
||||||
}
|
}
|
||||||
|
|
||||||
define ptr @test.test(<4 x float> %0) #0 !dbg !76 {
|
define ptr @test.test(<4 x float> %0) #0 !dbg !77
|
||||||
entry:
|
entry:
|
||||||
%color = alloca <4 x float>, align 16
|
%color = alloca <4 x float>, align 16
|
||||||
%x = alloca <4 x float>, align 16
|
%x = alloca <4 x float>, align 16
|
||||||
@@ -219,79 +219,92 @@ entry:
|
|||||||
%error_var5 = alloca i64, align 8
|
%error_var5 = alloca i64, align 8
|
||||||
%error_var11 = alloca i64, align 8
|
%error_var11 = alloca i64, align 8
|
||||||
store <4 x float> %0, ptr %color, align 16
|
store <4 x float> %0, ptr %color, align 16
|
||||||
!84
|
!85
|
||||||
%1 = load <4 x float>, ptr %color, align 16
|
%1 = load <4 x float>, ptr %color, align 16
|
||||||
store <4 x float> %1, ptr %x, align 16
|
store <4 x float> %1, ptr %x, align 16
|
||||||
%2 = call ptr @std.io.stdout(), !dbg !86
|
%2 = call ptr @std.io.stdout(), !dbg !87
|
||||||
store ptr %2, ptr %out, align 8
|
store ptr %2, ptr %out, align 8
|
||||||
%3 = load <4 x float>, ptr %x, align 16
|
%3 = load <4 x float>, ptr %x, align 16
|
||||||
store <4 x float> %3, ptr %x1, align 16
|
store <4 x float> %3, ptr %x1, align 16
|
||||||
!90
|
!91
|
||||||
%4 = load ptr, ptr %out, align 8
|
%4 = load ptr, ptr %out, align 8
|
||||||
store ptr %4, ptr %out2, align 8
|
store ptr %4, ptr %out2, align 8
|
||||||
%5 = load <4 x float>, ptr %x1, align 16
|
%5 = load <4 x float>, ptr %x1, align 16
|
||||||
store <4 x float> %5, ptr %x3, align 16
|
store <4 x float> %5, ptr %x3, align 16
|
||||||
%6 = load ptr, ptr %out2, align 8, !dbg !94
|
%6 = load ptr, ptr %out2, align 8, !dbg !95
|
||||||
%7 = insertvalue %any undef, ptr %6, 0, !dbg !94
|
%7 = insertvalue %any undef, ptr %6, 0, !dbg !95
|
||||||
%8 = insertvalue %any %7, i64 ptrtoint (ptr @"$ct.std.io.File" to i64), 1, !dbg !94
|
%8 = insertvalue %any %7, i64 ptrtoint (ptr @"$ct.std.io.File" to i64), 1, !dbg !95
|
||||||
%9 = insertvalue %any undef, ptr %x3, 0, !dbg !97
|
%9 = insertvalue %any undef, ptr %x3, 0, !dbg !98
|
||||||
%10 = insertvalue %any %9, i64 ptrtoint (ptr @"$ct.foo.Color" to i64), 1, !dbg !97
|
%10 = insertvalue %any %9, i64 ptrtoint (ptr @"$ct.foo.Color" to i64), 1, !dbg !98
|
||||||
store %any %10, ptr %varargslots, align 16, !dbg !97
|
store %any %10, ptr %varargslots, align 16, !dbg !98
|
||||||
%11 = insertvalue %"any[]" undef, ptr %varargslots, 0, !dbg !97
|
%11 = insertvalue %"any[]" undef, ptr %varargslots, 0, !dbg !98
|
||||||
%"$$temp" = insertvalue %"any[]" %11, i64 1, 1, !dbg !97
|
%"$$temp" = insertvalue %"any[]" %11, i64 1, 1, !dbg !98
|
||||||
store %any %8, ptr %taddr, align 8
|
store %any %8, ptr %taddr, align 8
|
||||||
%lo = load i64, ptr %taddr, align 8
|
%lo = load i64, ptr %taddr, align 8
|
||||||
%ptradd = getelementptr inbounds i8, ptr %taddr, i64 8
|
%ptradd = getelementptr inbounds i8, ptr %taddr, i64 8
|
||||||
%hi = load ptr, ptr %ptradd, align 8
|
%hi = load ptr, ptr %ptradd, align 8
|
||||||
store %"any[]" %"$$temp", ptr %indirectarg, align 8
|
store %"any[]" %"$$temp", ptr %indirectarg, align 8
|
||||||
%12 = call i64 @std.io.fprintf(ptr %retparam, i64 %lo, ptr %hi, ptr @.str, i64 2, ptr byval(%"any[]") align 8 %indirectarg), !dbg !98
|
%12 = call i64 @std.io.fprintf(ptr %retparam, i64 %lo, ptr %hi, ptr @.str, i64 2, ptr byval(%"any[]") align 8 %indirectarg), !dbg !99
|
||||||
%not_err = icmp eq i64 %12, 0, !dbg !98
|
%not_err = icmp eq i64 %12, 0, !dbg !99
|
||||||
%13 = call i1 @llvm.expect.i1(i1 %not_err, i1 true), !dbg !98
|
%13 = call i1 @llvm.expect.i1(i1 %not_err, i1 true), !dbg !99
|
||||||
br i1 %13, label %after_check, label %assign_optional, !dbg !98
|
br i1 %13, label %after_check, label %assign_optional, !dbg !99
|
||||||
|
|
||||||
assign_optional: ; preds = %entry
|
assign_optional: ; preds = %entry
|
||||||
store i64 %12, ptr %error_var, align 8, !dbg !98
|
store i64 %12, ptr %error_var, align 8, !dbg !99
|
||||||
br label %guard_block, !dbg !98
|
br label %guard_block, !dbg !99
|
||||||
|
|
||||||
after_check: ; preds = %entry
|
after_check: ; preds = %entry
|
||||||
br label %noerr_block, !dbg !98
|
br label %noerr_block, !dbg !99
|
||||||
|
|
||||||
guard_block: ; preds = %assign_optional
|
guard_block: ; preds = %assign_optional
|
||||||
br label %voiderr, !dbg !98
|
br label %voiderr, !dbg !99
|
||||||
|
|
||||||
noerr_block: ; preds = %after_check
|
noerr_block: ; preds = %after_check
|
||||||
%14 = load i64, ptr %retparam, align 8, !dbg !98
|
%14 = load i64, ptr %retparam, align 8, !dbg !99
|
||||||
store i64 %14, ptr %len, align 8, !dbg !98
|
store i64 %14, ptr %len, align 8, !dbg !99
|
||||||
%15 = load ptr, ptr %out, align 8, !dbg !99
|
%15 = load ptr, ptr %out, align 8, !dbg !100
|
||||||
%16 = call i64 @std.io.File.write_byte(ptr %15, i8 zeroext 10), !dbg !100
|
%16 = call i64 @std.io.File.write_byte(ptr %15, i8 zeroext 10), !dbg !101
|
||||||
%not_err6 = icmp eq i64 %16, 0, !dbg !100
|
%not_err6 = icmp eq i64 %16, 0, !dbg !101
|
||||||
%17 = call i1 @llvm.expect.i1(i1 %not_err6, i1 true), !dbg !100
|
%17 = call i1 @llvm.expect.i1(i1 %not_err6, i1 true), !dbg !101
|
||||||
br i1 %17, label %after_check8, label %assign_optional7, !dbg !100
|
br i1 %17, label %after_check8, label %assign_optional7, !dbg !101
|
||||||
|
|
||||||
assign_optional7: ; preds = %noerr_block
|
assign_optional7: ; preds = %noerr_block
|
||||||
store i64 %16, ptr %error_var5, align 8, !dbg !100
|
store i64 %16, ptr %error_var5, align 8, !dbg !101
|
||||||
br label %guard_block9, !dbg !100
|
br label %guard_block9, !dbg !101
|
||||||
|
|
||||||
after_check8: ; preds = %noerr_block
|
after_check8: ; preds = %noerr_block
|
||||||
br label %noerr_block10, !dbg !100
|
br label %noerr_block10, !dbg !101
|
||||||
|
|
||||||
guard_block9: ; preds = %assign_optional7
|
guard_block9: ; preds = %assign_optional7
|
||||||
br label %voiderr, !dbg !100
|
|
||||||
noerr_block10: ; preds = %after_check8
|
|
||||||
%18 = load ptr, ptr %out, align 8, !dbg !101
|
|
||||||
%19 = call i64 @std.io.File.flush(ptr %18), !dbg !101
|
|
||||||
%not_err12 = icmp eq i64 %19, 0, !dbg !101
|
|
||||||
%20 = call i1 @llvm.expect.i1(i1 %not_err12, i1 true), !dbg !101
|
|
||||||
br i1 %20, label %after_check14, label %assign_optional13, !dbg !101
|
|
||||||
assign_optional13: ; preds = %noerr_block10
|
|
||||||
store i64 %19, ptr %error_var11, align 8, !dbg !101
|
|
||||||
br label %guard_block15, !dbg !101
|
|
||||||
after_check14: ; preds = %noerr_block10
|
|
||||||
br label %noerr_block16, !dbg !101
|
|
||||||
guard_block15: ; preds = %assign_optional13
|
|
||||||
br label %voiderr, !dbg !101
|
br label %voiderr, !dbg !101
|
||||||
|
|
||||||
|
noerr_block10: ; preds = %after_check8
|
||||||
|
%18 = load ptr, ptr %out, align 8, !dbg !102
|
||||||
|
%19 = call i64 @std.io.File.flush(ptr %18), !dbg !102
|
||||||
|
%not_err12 = icmp eq i64 %19, 0, !dbg !102
|
||||||
|
%20 = call i1 @llvm.expect.i1(i1 %not_err12, i1 true), !dbg !102
|
||||||
|
br i1 %20, label %after_check14, label %assign_optional13, !dbg !102
|
||||||
|
|
||||||
|
assign_optional13: ; preds = %noerr_block10
|
||||||
|
store i64 %19, ptr %error_var11, align 8, !dbg !102
|
||||||
|
br label %guard_block15, !dbg !102
|
||||||
|
|
||||||
|
after_check14: ; preds = %noerr_block10
|
||||||
|
br label %noerr_block16, !dbg !102
|
||||||
|
|
||||||
|
guard_block15: ; preds = %assign_optional13
|
||||||
|
br label %voiderr, !dbg !102
|
||||||
|
|
||||||
noerr_block16: ; preds = %after_check14
|
noerr_block16: ; preds = %after_check14
|
||||||
%21 = load i64, ptr %len, align 8, !dbg !102
|
%21 = load i64, ptr %len, align 8, !dbg !103
|
||||||
%add = add i64 %21, 1, !dbg !102
|
%add = add i64 %21, 1, !dbg !103
|
||||||
br label %voiderr, !dbg !93
|
br label %voiderr, !dbg !94
|
||||||
|
|
||||||
voiderr: ; preds = %noerr_block16, %guard_block15, %guard_block9, %guard_block
|
voiderr: ; preds = %noerr_block16, %guard_block15, %guard_block9, %guard_block
|
||||||
ret ptr null, !dbg !103
|
ret ptr null, !dbg !104
|
||||||
}
|
}
|
||||||
|
|
||||||
define ptr @test.test2() #0 !dbg !104 {
|
define ptr @test.test2() #0 !dbg !105 {
|
||||||
entry:
|
entry:
|
||||||
%conflicts = alloca %"Arena*[]", align 8
|
%conflicts = alloca %"Arena*[]", align 8
|
||||||
%scratch = alloca %Arena_Cursor, align 8
|
%scratch = alloca %Arena_Cursor, align 8
|
||||||
@@ -299,27 +312,27 @@ entry:
|
|||||||
%scratch1 = alloca ptr, align 8
|
%scratch1 = alloca ptr, align 8
|
||||||
%asdf = alloca ptr, align 8
|
%asdf = alloca ptr, align 8
|
||||||
store %"Arena*[]" zeroinitializer, ptr %conflicts, align 8
|
store %"Arena*[]" zeroinitializer, ptr %conflicts, align 8
|
||||||
!107
|
!108
|
||||||
%lo = load ptr, ptr %conflicts, align 8, !dbg !119
|
%lo = load ptr, ptr %conflicts, align 8, !dbg !120
|
||||||
%ptradd = getelementptr inbounds i8, ptr %conflicts, i64 8, !dbg !119
|
%ptradd = getelementptr inbounds i8, ptr %conflicts, i64 8, !dbg !120
|
||||||
%hi = load i64, ptr %ptradd, align 8, !dbg !119
|
%hi = load i64, ptr %ptradd, align 8, !dbg !120
|
||||||
%0 = call { ptr, i64 } @arena_scratch_begin(ptr %lo, i64 %hi), !dbg !120
|
%0 = call { ptr, i64 } @arena_scratch_begin(ptr %lo, i64 %hi), !dbg !121
|
||||||
store { ptr, i64 } %0, ptr %result, align 8
|
store { ptr, i64 } %0, ptr %result, align 8
|
||||||
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %scratch, ptr align 8 %result, i32 16, i1 false)
|
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %scratch, ptr align 8 %result, i32 16, i1 false)
|
||||||
!121
|
!122
|
||||||
%1 = load ptr, ptr %scratch, align 8, !dbg !123
|
%1 = load ptr, ptr %scratch, align 8, !dbg !124
|
||||||
store ptr %1, ptr %scratch1, align 8, !dbg !123
|
store ptr %1, ptr %scratch1, align 8, !dbg !124
|
||||||
!125
|
!126
|
||||||
store ptr null, ptr %asdf, align 8, !dbg !127
|
store ptr null, ptr %asdf, align 8, !dbg !128
|
||||||
%2 = load ptr, ptr %asdf, align 8, !dbg !128
|
%2 = load ptr, ptr %asdf, align 8, !dbg !129
|
||||||
%lo2 = load ptr, ptr %scratch, align 8, !dbg !129
|
%lo2 = load ptr, ptr %scratch, align 8, !dbg !130
|
||||||
%ptradd3 = getelementptr inbounds i8, ptr %scratch, i64 8, !dbg !129
|
%ptradd3 = getelementptr inbounds i8, ptr %scratch, i64 8, !dbg !130
|
||||||
%hi4 = load i64, ptr %ptradd3, align 8, !dbg !129
|
%hi4 = load i64, ptr %ptradd3, align 8, !dbg !130
|
||||||
call void @arena_scratch_end(ptr %lo2, i64 %hi4)
|
call void @arena_scratch_end(ptr %lo2, i64 %hi4)
|
||||||
ret ptr %2, !dbg !131
|
ret ptr %2, !dbg !132
|
||||||
}
|
}
|
||||||
|
|
||||||
define i32 @main(i32 %0, ptr %1) #0 !dbg !132 {
|
define i32 @main(i32 %0, ptr %1) #0 !dbg !133 {
|
||||||
entry:
|
entry:
|
||||||
%.anon = alloca i32, align 4
|
%.anon = alloca i32, align 4
|
||||||
%.anon1 = alloca ptr, align 8
|
%.anon1 = alloca ptr, align 8
|
||||||
@@ -352,21 +365,21 @@ entry:
|
|||||||
%len18 = alloca i64, align 8
|
%len18 = alloca i64, align 8
|
||||||
store ptr null, ptr %.cachedtype, align 8
|
store ptr null, ptr %.cachedtype, align 8
|
||||||
store i32 %0, ptr %.anon, align 4
|
store i32 %0, ptr %.anon, align 4
|
||||||
!136
|
!137
|
||||||
store ptr %1, ptr %.anon1, align 8
|
store ptr %1, ptr %.anon1, align 8
|
||||||
!138
|
!139
|
||||||
%2 = load i32, ptr %.anon, align 4
|
%2 = load i32, ptr %.anon, align 4
|
||||||
store i32 %2, ptr %argc, align 4
|
store i32 %2, ptr %argc, align 4
|
||||||
%3 = load ptr, ptr %.anon1, align 8
|
%3 = load ptr, ptr %.anon1, align 8
|
||||||
store ptr %3, ptr %argv, align 8
|
store ptr %3, ptr %argv, align 8
|
||||||
!139
|
!140
|
||||||
%4 = load i32, ptr %argc, align 4
|
%4 = load i32, ptr %argc, align 4
|
||||||
store i32 %4, ptr %argc2, align 4
|
store i32 %4, ptr %argc2, align 4
|
||||||
%5 = load ptr, ptr %argv, align 8
|
%5 = load ptr, ptr %argv, align 8
|
||||||
store ptr %5, ptr %argv3, align 8
|
store ptr %5, ptr %argv3, align 8
|
||||||
!143
|
!144
|
||||||
%6 = load i32, ptr %argc2, align 4, !dbg !147
|
%6 = load i32, ptr %argc2, align 4, !dbg !148
|
||||||
%sext = sext i32 %6 to i64, !dbg !147
|
%sext = sext i32 %6 to i64, !dbg !148
|
||||||
store i64 %sext, ptr %elements, align 8
|
store i64 %sext, ptr %elements, align 8
|
||||||
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %allocator, ptr align 8 @std.core.mem.allocator.thread_allocator, i32 16, i1 false)
|
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %allocator, ptr align 8 @std.core.mem.allocator.thread_allocator, i32 16, i1 false)
|
||||||
%7 = load i64, ptr %elements, align 8
|
%7 = load i64, ptr %elements, align 8
|
||||||
@@ -375,19 +388,21 @@ entry:
|
|||||||
%8 = load i64, ptr %elements6, align 8
|
%8 = load i64, ptr %elements6, align 8
|
||||||
store i64 %8, ptr %elements8, align 8
|
store i64 %8, ptr %elements8, align 8
|
||||||
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %allocator10, ptr align 8 %allocator7, i32 16, i1 false)
|
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %allocator10, ptr align 8 %allocator7, i32 16, i1 false)
|
||||||
%9 = load i64, ptr %elements8, align 8, !dbg !148
|
%9 = load i64, ptr %elements8, align 8, !dbg !149
|
||||||
%mul = mul i64 16, %9, !dbg !156
|
%mul = mul i64 16, %9, !dbg !157
|
||||||
store i64 %mul, ptr %size, align 8
|
store i64 %mul, ptr %size, align 8
|
||||||
%10 = load i64, ptr %size, align 8, !dbg !157
|
%10 = load i64, ptr %size, align 8, !dbg !158
|
||||||
%not = icmp eq i64 %10, 0, !dbg !157
|
%not = icmp eq i64 %10, 0, !dbg !158
|
||||||
br i1 %not, label %if.then, label %if.exit, !dbg !157
|
br i1 %not, label %if.then, label %if.exit, !dbg !158
|
||||||
|
|
||||||
if.then: ; preds = %entry
|
if.then: ; preds = %entry
|
||||||
store ptr null, ptr %blockret11, align 8, !dbg !160
|
store ptr null, ptr %blockret11, align 8, !dbg !161
|
||||||
br label %expr_block.exit, !dbg !160
|
br label %expr_block.exit, !dbg !161
|
||||||
|
|
||||||
if.exit: ; preds = %entry
|
if.exit: ; preds = %entry
|
||||||
%ptradd = getelementptr inbounds i8, ptr %allocator10, i64 8, !dbg !161
|
%ptradd = getelementptr inbounds i8, ptr %allocator10, i64 8, !dbg !162
|
||||||
%11 = load i64, ptr %ptradd, align 8, !dbg !161
|
%11 = load i64, ptr %ptradd, align 8, !dbg !162
|
||||||
%12 = inttoptr i64 %11 to ptr, !dbg !161
|
%12 = inttoptr i64 %11 to ptr, !dbg !162
|
||||||
%type = load ptr, ptr %.cachedtype, align 8
|
%type = load ptr, ptr %.cachedtype, align 8
|
||||||
%13 = icmp eq ptr %12, %type
|
%13 = icmp eq ptr %12, %type
|
||||||
br i1 %13, label %cache_hit, label %cache_miss
|
br i1 %13, label %cache_hit, label %cache_miss
|
||||||
@@ -406,143 +421,169 @@ cache_hit: ; preds = %if.exit
|
|||||||
%17 = icmp eq ptr %fn_phi, null
|
%17 = icmp eq ptr %fn_phi, null
|
||||||
br i1 %17, label %missing_function, label %match
|
br i1 %17, label %missing_function, label %match
|
||||||
missing_function: ; preds = %16
|
missing_function: ; preds = %16
|
||||||
%18 = load ptr, ptr @std.core.builtin.panic, align 8, !dbg !163
|
%18 = load ptr, ptr @std.core.builtin.panic, align 8, !dbg !164
|
||||||
call void %18(ptr @.panic_msg, i64 44, ptr @.file, i64 16, ptr @.func, i64 6, i32 68), !dbg !163
|
call void %18(ptr @.panic_msg, i64 44, ptr @.file, i64 16, ptr @.func, i64 6, i32 68), !dbg !164
|
||||||
unreachable, !dbg !163
|
unreachable, !dbg !164
|
||||||
|
|
||||||
match: ; preds = %16
|
match: ; preds = %16
|
||||||
%19 = load ptr, ptr %allocator10, align 8
|
%19 = load ptr, ptr %allocator10, align 8
|
||||||
%20 = load i64, ptr %size, align 8
|
%20 = load i64, ptr %size, align 8
|
||||||
%21 = call i64 %fn_phi(ptr %retparam, ptr %19, i64 %20, i32 0, i64 0), !dbg !163
|
%21 = call i64 %fn_phi(ptr %retparam, ptr %19, i64 %20, i32 0, i64 0), !dbg !164
|
||||||
%not_err = icmp eq i64 %21, 0, !dbg !163
|
%not_err = icmp eq i64 %21, 0, !dbg !164
|
||||||
%22 = call i1 @llvm.expect.i1(i1 %not_err, i1 true), !dbg !163
|
%22 = call i1 @llvm.expect.i1(i1 %not_err, i1 true), !dbg !164
|
||||||
br i1 %22, label %after_check, label %assign_optional, !dbg !163
|
br i1 %22, label %after_check, label %assign_optional, !dbg !164
|
||||||
|
|
||||||
assign_optional: ; preds = %match
|
assign_optional: ; preds = %match
|
||||||
store i64 %21, ptr %error_var, align 8, !dbg !163
|
store i64 %21, ptr %error_var, align 8, !dbg !164
|
||||||
br label %panic_block, !dbg !163
|
br label %panic_block, !dbg !164
|
||||||
|
|
||||||
after_check: ; preds = %match
|
after_check: ; preds = %match
|
||||||
%23 = load ptr, ptr %retparam, align 8, !dbg !163
|
%23 = load ptr, ptr %retparam, align 8, !dbg !164
|
||||||
store ptr %23, ptr %blockret11, align 8, !dbg !163
|
store ptr %23, ptr %blockret11, align 8, !dbg !164
|
||||||
br label %expr_block.exit, !dbg !163
|
br label %expr_block.exit, !dbg !164
|
||||||
|
|
||||||
expr_block.exit: ; preds = %after_check, %if.then
|
expr_block.exit: ; preds = %after_check, %if.then
|
||||||
%24 = load ptr, ptr %blockret11, align 8, !dbg !163
|
%24 = load ptr, ptr %blockret11, align 8, !dbg !164
|
||||||
store ptr %24, ptr %taddr, align 8
|
store ptr %24, ptr %taddr, align 8
|
||||||
%25 = load ptr, ptr %taddr, align 8
|
%25 = load ptr, ptr %taddr, align 8
|
||||||
%26 = load i64, ptr %elements8, align 8, !dbg !164
|
%26 = load i64, ptr %elements8, align 8, !dbg !165
|
||||||
%add = add i64 0, %26, !dbg !164
|
%add = add i64 0, %26, !dbg !165
|
||||||
%size13 = sub i64 %add, 0, !dbg !164
|
%size13 = sub i64 %add, 0, !dbg !165
|
||||||
%27 = insertvalue %"char[][]" undef, ptr %25, 0, !dbg !164
|
%27 = insertvalue %"char[][]" undef, ptr %25, 0, !dbg !165
|
||||||
%28 = insertvalue %"char[][]" %27, i64 %size13, 1, !dbg !164
|
%28 = insertvalue %"char[][]" %27, i64 %size13, 1, !dbg !165
|
||||||
br label %noerr_block, !dbg !164
|
br label %noerr_block, !dbg !165
|
||||||
|
|
||||||
panic_block: ; preds = %assign_optional
|
panic_block: ; preds = %assign_optional
|
||||||
%29 = insertvalue %any undef, ptr %error_var, 0, !dbg !164
|
%29 = insertvalue %any undef, ptr %error_var, 0, !dbg !165
|
||||||
%30 = insertvalue %any %29, i64 ptrtoint (ptr @"$ct.anyfault" to i64), 1, !dbg !164
|
%30 = insertvalue %any %29, i64 ptrtoint (ptr @"$ct.anyfault" to i64), 1, !dbg !165
|
||||||
store %any %30, ptr %varargslots, align 16
|
store %any %30, ptr %varargslots, align 16
|
||||||
%31 = insertvalue %"any[]" undef, ptr %varargslots, 0
|
%31 = insertvalue %"any[]" undef, ptr %varargslots, 0
|
||||||
%"$$temp" = insertvalue %"any[]" %31, i64 1, 1
|
%"$$temp" = insertvalue %"any[]" %31, i64 1, 1
|
||||||
store %"any[]" %"$$temp", ptr %indirectarg, align 8
|
store %"any[]" %"$$temp", ptr %indirectarg, align 8
|
||||||
call void @std.core.builtin.panicf(ptr @.panic_msg.1
|
call void @std.core.builtin.panicf(ptr @.panic_msg.1
|
||||||
unreachable, !dbg !151
|
unreachable, !dbg !152
|
||||||
|
|
||||||
noerr_block: ; preds = %expr_block.exit
|
noerr_block: ; preds = %expr_block.exit
|
||||||
store %"char[][]" %28, ptr %list5, align 8, !dbg !151
|
store %"char[][]" %28, ptr %list5, align 8, !dbg !152
|
||||||
!165
|
!166
|
||||||
store i32 0, ptr %i, align 4, !dbg !168
|
store i32 0, ptr %i, align 4, !dbg !169
|
||||||
br label %loop.cond, !dbg !168
|
br label %loop.cond, !dbg !169
|
||||||
|
|
||||||
loop.cond: ; preds = %loop.exit, %noerr_block
|
loop.cond: ; preds = %loop.exit, %noerr_block
|
||||||
%32 = load i32, ptr %i, align 4, !dbg !169
|
%32 = load i32, ptr %i, align 4, !dbg !170
|
||||||
%33 = load i32, ptr %argc2, align 4, !dbg !170
|
%33 = load i32, ptr %argc2, align 4, !dbg !171
|
||||||
%lt = icmp slt i32 %32, %33, !dbg !169
|
%lt = icmp slt i32 %32, %33, !dbg !170
|
||||||
br i1 %lt, label %loop.body, label %loop.exit26, !dbg !169
|
br i1 %lt, label %loop.body, label %loop.exit26, !dbg !170
|
||||||
|
|
||||||
loop.body: ; preds = %loop.cond
|
loop.body: ; preds = %loop.cond
|
||||||
!171
|
!172
|
||||||
%34 = load ptr, ptr %argv3, align 8, !dbg !174
|
%34 = load ptr, ptr %argv3, align 8, !dbg !175
|
||||||
%35 = load i32, ptr %i, align 4, !dbg !175
|
%35 = load i32, ptr %i, align 4, !dbg !176
|
||||||
%sext14 = sext i32 %35 to i64, !dbg !175
|
%sext14 = sext i32 %35 to i64, !dbg !176
|
||||||
%ptroffset = getelementptr inbounds [8 x i8], ptr %34, i64 %sext14, !dbg !175
|
%ptroffset = getelementptr inbounds [8 x i8], ptr %34, i64 %sext14, !dbg !176
|
||||||
%36 = load ptr, ptr %ptroffset, align 8, !dbg !175
|
%36 = load ptr, ptr %ptroffset, align 8, !dbg !176
|
||||||
store ptr %36, ptr %arg, align 8, !dbg !175
|
store ptr %36, ptr %arg, align 8, !dbg !176
|
||||||
!176
|
!177
|
||||||
store i64 0, ptr %len, align 8, !dbg !178
|
store i64 0, ptr %len, align 8, !dbg !179
|
||||||
%37 = load ptr, ptr %list5, align 8, !dbg !179
|
%37 = load ptr, ptr %list5, align 8, !dbg !180
|
||||||
%38 = load i32, ptr %i, align 4, !dbg !180
|
%38 = load i32, ptr %i, align 4, !dbg !181
|
||||||
%sext15 = sext i32 %38 to i64, !dbg !180
|
%sext15 = sext i32 %38 to i64, !dbg !181
|
||||||
%ptroffset16 = getelementptr inbounds [16 x i8], ptr %37, i64 %sext15, !dbg !180
|
%ptroffset16 = getelementptr inbounds [16 x i8], ptr %37, i64 %sext15, !dbg !181
|
||||||
%39 = load ptr, ptr %arg, align 8, !dbg !181
|
%39 = load ptr, ptr %arg, align 8, !dbg !182
|
||||||
%40 = load ptr, ptr %arg, align 8
|
%40 = load ptr, ptr %arg, align 8
|
||||||
store ptr %40, ptr %ptr, align 8
|
store ptr %40, ptr %ptr, align 8
|
||||||
!182
|
!183
|
||||||
store i64 0, ptr %len18, align 8, !dbg !186
|
store i64 0, ptr %len18, align 8, !dbg !187
|
||||||
br label %loop.cond19, !dbg !187
|
br label %loop.cond19, !dbg !188
|
||||||
|
|
||||||
loop.cond19: ; preds = %loop.body21, %loop.body
|
loop.cond19: ; preds = %loop.body21, %loop.body
|
||||||
%41 = load ptr, ptr %ptr, align 8, !dbg !188
|
%41 = load ptr, ptr %ptr, align 8, !dbg !189
|
||||||
%42 = load i64, ptr %len18, align 8, !dbg !190
|
%42 = load i64, ptr %len18, align 8, !dbg !191
|
||||||
%ptradd20 = getelementptr inbounds i8, ptr %41, i64 %42, !dbg !190
|
%ptradd20 = getelementptr inbounds i8, ptr %41, i64 %42, !dbg !191
|
||||||
%43 = load i8, ptr %ptradd20, align 1, !dbg !190
|
%43 = load i8, ptr %ptradd20, align 1, !dbg !191
|
||||||
%intbool = icmp ne i8 %43, 0, !dbg !190
|
%intbool = icmp ne i8 %43, 0, !dbg !191
|
||||||
br i1 %intbool, label %loop.body21, label %loop.exit, !dbg !190
|
br i1 %intbool, label %loop.body21, label %loop.exit, !dbg !191
|
||||||
|
|
||||||
loop.body21: ; preds = %loop.cond19
|
loop.body21: ; preds = %loop.cond19
|
||||||
%44 = load i64, ptr %len18, align 8, !dbg !191
|
%44 = load i64, ptr %len18, align 8, !dbg !192
|
||||||
%add22 = add i64 %44, 1, !dbg !191
|
%add22 = add i64 %44, 1, !dbg !192
|
||||||
store i64 %add22, ptr %len18, align 8, !dbg !191
|
store i64 %add22, ptr %len18, align 8, !dbg !192
|
||||||
br label %loop.cond19, !dbg !191
|
br label %loop.cond19, !dbg !192
|
||||||
|
|
||||||
loop.exit: ; preds = %loop.cond19
|
loop.exit: ; preds = %loop.cond19
|
||||||
%45 = load i64, ptr %len18, align 8, !dbg !192
|
%45 = load i64, ptr %len18, align 8, !dbg !193
|
||||||
%add23 = add i64 0, %45, !dbg !192
|
%add23 = add i64 0, %45, !dbg !193
|
||||||
%size24 = sub i64 %add23, 0, !dbg !192
|
%size24 = sub i64 %add23, 0, !dbg !193
|
||||||
%46 = insertvalue %"char[]" undef, ptr %39, 0, !dbg !192
|
%46 = insertvalue %"char[]" undef, ptr %39, 0, !dbg !193
|
||||||
%47 = insertvalue %"char[]" %46, i64 %size24, 1, !dbg !192
|
%47 = insertvalue %"char[]" %46, i64 %size24, 1, !dbg !193
|
||||||
store %"char[]" %47, ptr %ptroffset16, align 8, !dbg !192
|
store %"char[]" %47, ptr %ptroffset16, align 8, !dbg !193
|
||||||
%48 = load i32, ptr %i, align 4, !dbg !193
|
%48 = load i32, ptr %i, align 4, !dbg !194
|
||||||
%add25 = add i32 %48, 1, !dbg !193
|
%add25 = add i32 %48, 1, !dbg !194
|
||||||
store i32 %add25, ptr %i, align 4, !dbg !193
|
store i32 %add25, ptr %i, align 4, !dbg !194
|
||||||
br label %loop.cond, !dbg !193
|
br label %loop.cond, !dbg !194
|
||||||
|
|
||||||
loop.exit26: ; preds = %loop.cond
|
loop.exit26: ; preds = %loop.cond
|
||||||
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %list, ptr align 8 %list5, i32 16, i1 false), !dbg !194
|
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %list, ptr align 8 %list5, i32 16, i1 false), !dbg !195
|
||||||
%lo = load ptr, ptr %list, align 8, !dbg !195
|
%lo = load ptr, ptr %list, align 8, !dbg !196
|
||||||
%ptradd27 = getelementptr inbounds i8, ptr %list, i64 8, !dbg !195
|
%ptradd27 = getelementptr inbounds i8, ptr %list, i64 8, !dbg !196
|
||||||
%hi = load i64, ptr %ptradd27, align 8, !dbg !195
|
%hi = load i64, ptr %ptradd27, align 8, !dbg !196
|
||||||
%49 = call i32 @test.main(ptr %lo, i64 %hi), !dbg !196
|
%49 = call i32 @test.main(ptr %lo, i64 %hi), !dbg !197
|
||||||
store i32 %49, ptr %blockret, align 4, !dbg !196
|
store i32 %49, ptr %blockret, align 4, !dbg !197
|
||||||
%50 = load ptr, ptr %list, align 8, !dbg !197
|
%50 = load ptr, ptr %list, align 8, !dbg !198
|
||||||
call void @std.core.mem.free(ptr %50)
|
call void @std.core.mem.free(ptr %50)
|
||||||
br label %expr_block.exit28, !dbg !199
|
br label %expr_block.exit28, !dbg !200
|
||||||
|
|
||||||
expr_block.exit28: ; preds = %loop.exit26
|
expr_block.exit28: ; preds = %loop.exit26
|
||||||
%51 = load i32, ptr %blockret, align 4, !dbg !199
|
%51 = load i32, ptr %blockret, align 4, !dbg !200
|
||||||
ret i32 %51, !dbg !199
|
ret i32 %51, !dbg !200
|
||||||
}
|
}
|
||||||
|
|
||||||
declare { i32, ptr } @attach.to_scope() #0
|
declare { i32, ptr } @attach.to_scope() #0
|
||||||
|
|
||||||
declare ptr @std.core.mem.calloc(i64) #0
|
declare ptr @std.core.mem.calloc(i64) #0
|
||||||
|
|
||||||
declare ptr @std.io.stdout() #0
|
declare ptr @std.io.stdout() #0
|
||||||
|
|
||||||
declare i64 @std.io.fprintf(ptr, i64, ptr, ptr, i64, ptr byval(%"any[]") align 8) #0
|
declare i64 @std.io.fprintf(ptr, i64, ptr, ptr, i64, ptr byval(%"any[]") align 8) #0
|
||||||
declare i1 @llvm.expect.i1(i1, i1)
|
declare i1 @llvm.expect.i1(i1, i1)
|
||||||
|
|
||||||
declare i64 @std.io.File.write_byte(ptr, i8 zeroext) #0
|
declare i64 @std.io.File.write_byte(ptr, i8 zeroext) #0
|
||||||
|
|
||||||
declare i64 @std.io.File.flush(ptr) #0
|
declare i64 @std.io.File.flush(ptr) #0
|
||||||
|
|
||||||
declare { ptr, i64 } @arena_scratch_begin(ptr, i64) #0
|
declare { ptr, i64 } @arena_scratch_begin(ptr, i64) #0
|
||||||
declare void @llvm.memcpy.p0.p0.i32(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i32, i1 immarg)
|
|
||||||
declare void @arena_scratch_end(ptr, i64) #0
|
declare void @arena_scratch_end(ptr, i64) #0
|
||||||
|
|
||||||
define weak_odr ptr @.dyn_search(ptr %0, ptr %1) unnamed_addr {
|
define weak_odr ptr @.dyn_search(ptr %0, ptr %1) unnamed_addr {
|
||||||
entry:
|
entry:
|
||||||
br label %check
|
br label %check
|
||||||
|
|
||||||
check: ; preds = %no_match, %entry
|
check: ; preds = %no_match, %entry
|
||||||
%2 = phi ptr [ %0, %entry ], [ %9, %no_match ]
|
%2 = phi ptr [ %0, %entry ], [ %9, %no_match ]
|
||||||
%3 = icmp eq ptr %2, null
|
%3 = icmp eq ptr %2, null
|
||||||
br i1 %3, label %missing_function, label %compare
|
br i1 %3, label %missing_function, label %compare
|
||||||
|
|
||||||
missing_function: ; preds = %check
|
missing_function: ; preds = %check
|
||||||
ret ptr null
|
ret ptr null
|
||||||
|
|
||||||
compare: ; preds = %check
|
compare: ; preds = %check
|
||||||
%4 = getelementptr inbounds
|
%4 = getelementptr inbounds
|
||||||
%5 = load ptr, ptr %4, align 8
|
%5 = load ptr, ptr %4, align 8
|
||||||
%6 = icmp eq ptr %5, %1
|
%6 = icmp eq ptr %5, %1
|
||||||
br i1 %6, label %match, label %no_match
|
br i1 %6, label %match, label %no_match
|
||||||
|
|
||||||
match: ; preds = %compare
|
match: ; preds = %compare
|
||||||
%7 = load ptr, ptr %2, align 8
|
%7 = load ptr, ptr %2, align 8
|
||||||
ret ptr %7
|
ret ptr %7
|
||||||
|
|
||||||
no_match: ; preds = %compare
|
no_match: ; preds = %compare
|
||||||
%8 = getelementptr inbounds
|
%8 = getelementptr inbounds
|
||||||
%9 = load ptr, ptr %8, align 8
|
%9 = load ptr, ptr %8, align 8
|
||||||
br label %check
|
br label %check
|
||||||
}
|
}
|
||||||
!llvm.dbg.cu = !{!4}
|
!llvm.dbg.cu = !{!4}
|
||||||
|
|
||||||
!0 = !{i32 2, !"Dwarf Version", i32 4}
|
!0 = !{i32 2, !"Dwarf Version", i32 4}
|
||||||
!1 = !{i32 2, !"Debug Info Version", i32 3}
|
!1 = !{i32 2, !"Debug Info Version", i32 3}
|
||||||
!2 = !{i32 2, !"frame-pointer", i32 2}
|
!2 = !{i32 2, !"frame-pointer", i32 2}
|
||||||
@@ -577,7 +618,7 @@ no_match: ; preds = %compare
|
|||||||
!31 = !DISubroutineType(types: !32)
|
!31 = !DISubroutineType(types: !32)
|
||||||
!32 = !{!13, !33}
|
!32 = !{!13, !33}
|
||||||
!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "String[]", size: 128, align: 64, elements: !34, identifier: "String[]")
|
!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "String[]", size: 128, align: 64, elements: !34, identifier: "String[]")
|
||||||
!34 = !{!35, !45}
|
!34 = !{!35, !46}
|
||||||
!35 = !DIDerivedType(tag: DW_TAG_member, name: "ptr", scope: !33, baseType: !36, size: 64, align: 64)
|
!35 = !DIDerivedType(tag: DW_TAG_member, name: "ptr", scope: !33, baseType: !36, size: 64, align: 64)
|
||||||
!36 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "String*", baseType: !37, size: 64, align: 64, dwarfAddressSpace: 0)
|
!36 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "String*", baseType: !37, size: 64, align: 64, dwarfAddressSpace: 0)
|
||||||
!37 = !DIDerivedType(tag: DW_TAG_typedef, name: "String", baseType: !38)
|
!37 = !DIDerivedType(tag: DW_TAG_typedef, name: "String", baseType: !38)
|
||||||
@@ -587,59 +628,59 @@ no_match: ; preds = %compare
|
|||||||
!41 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "char*", baseType: !42, size: 64, align: 64, dwarfAddressSpace: 0)
|
!41 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "char*", baseType: !42, size: 64, align: 64, dwarfAddressSpace: 0)
|
||||||
!42 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_unsigned_char)
|
!42 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_unsigned_char)
|
||||||
!43 = !DIDerivedType(tag: DW_TAG_member, name: "len", scope: !38, baseType: !44, size: 64, align: 64, offset: 64)
|
!43 = !DIDerivedType(tag: DW_TAG_member, name: "len", scope: !38, baseType: !44, size: 64, align: 64, offset: 64)
|
||||||
!44 = !DIBasicType(name: "ulong", size: 64, encoding: DW_ATE_unsigned)
|
!44 = !DIDerivedType(tag: DW_TAG_typedef, name: "usz", baseType: !45)
|
||||||
!45 = !DIDerivedType(tag: DW_TAG_member, name: "len", scope: !33, baseType: !44, size: 64, align: 64, offset: 64)
|
!45 = !DIBasicType(name: "ulong", size: 64, encoding: DW_ATE_unsigned)
|
||||||
!46 = !DILocalVariable(name: "args", arg: 1, scope: !30, file: !5, line: 15, type: !33)
|
!46 = !DIDerivedType(tag: DW_TAG_member, name: "len", scope: !33, baseType: !44, size: 64, align: 64, offset: 64)
|
||||||
!47 = !DILocation(line: 15, column: 22, scope: !30)
|
!47 = !DILocalVariable(name: "args", arg: 1, scope: !30, file: !5, line: 15, type: !33)
|
||||||
!48 = !DILocalVariable(name: "asdf", scope: !30, file: !5, line: 18, type: !49, align: 8)
|
!48 = !DILocation(line: 15, column: 22, scope: !30)
|
||||||
!49 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "Foo*", baseType: !50, size: 64, align: 64, dwarfAddressSpace: 0)
|
!49 = !DILocalVariable(name: "asdf", scope: !30, file: !5, line: 18, type: !50, align: 8)
|
||||||
!50 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", scope: !5, file: !5, line: 27, size: 64, align: 64, elements: !51, identifier: "test.Foo")
|
!50 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "Foo*", baseType: !51, size: 64, align: 64, dwarfAddressSpace: 0)
|
||||||
!51 = !{!52}
|
!51 = !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", scope: !5, file: !5, line: 27, size: 64, align: 64, elements: !52, identifier: "test.Foo")
|
||||||
!52 = !DIDerivedType(tag: DW_TAG_member, name: "asdf", scope: !50, file: !5, line: 28, baseType: !12, size: 64, align: 64)
|
!52 = !{!53}
|
||||||
!53 = !DILocation(line: 18, column: 8, scope: !30)
|
!53 = !DIDerivedType(tag: DW_TAG_member, name: "asdf", scope: !51, file: !5, line: 28, baseType: !12, size: 64, align: 64)
|
||||||
!54 = !DILocation(line: 18, column: 34, scope: !30)
|
!54 = !DILocation(line: 18, column: 8, scope: !30)
|
||||||
!55 = !DILocation
|
!55 = !DILocation(line: 18, column: 34, scope: !30)
|
||||||
!56 = distinct !DISubprogram(name: "[DEFAULT INIT]", linkageName: "[DEFAULT INIT]", scope: !5, file: !5, line: 33, scopeLine: 33, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
!56 = !DILocation
|
||||||
!57 = !DILocation(line: 18, column: 15, scope: !30)
|
!57 = distinct !DISubprogram(name: "[DEFAULT INIT]", linkageName: "[DEFAULT INIT]", scope: !5, file: !5, line: 33, scopeLine: 33, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
||||||
!58 = !DILocation(line: 21, column: 8, scope: !30)
|
!58 = !DILocation(line: 18, column: 15, scope: !30)
|
||||||
!59 = !DILocation(line: 21, column: 42, scope: !30)
|
!59 = !DILocation(line: 21, column: 8, scope: !30)
|
||||||
!60 = !DILocation(line: 21, column: 3, scope: !30)
|
!60 = !DILocation(line: 21, column: 42, scope: !30)
|
||||||
!61 = !DILocation(line: 23, column: 3, scope: !30)
|
!61 = !DILocation(line: 21, column: 3, scope: !30)
|
||||||
!62 = !DILocation(line: 24, column: 10, scope: !30)
|
!62 = !DILocation(line: 23, column: 3, scope: !30)
|
||||||
!63 = distinct !DISubprogram(name: "create_foo", linkageName: "test.create_foo", scope: !5, file: !5, line: 33, type: !64, scopeLine: 33, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition
|
!63 = !DILocation(line: 24, column: 10, scope: !30)
|
||||||
!64 = !DISubroutineType(types: !65)
|
!64 = distinct !DISubprogram(name: "create_foo", linkageName: "test.create_foo", scope: !5, file: !5, line: 33, type: !65, scopeLine: 33, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !4, retainedNodes: !19)
|
||||||
!65 = !{!49, !8, !44, !37}
|
!65 = !DISubroutineType(types: !66)
|
||||||
!66 = !DILocalVariable(name: "attach", arg: 1, scope: !63, file: !5, line: 33, type: !8)
|
!66 = !{!50, !8, !45, !37}
|
||||||
!67 = !DILocation(line: 33, column: 31, scope: !63)
|
!67 = !DILocalVariable(name: "attach", arg: 1, scope: !64, file: !5, line: 33, type: !8)
|
||||||
!68 = !DILocalVariable(name: "flags", arg: 2, scope: !63, file: !5, line: 33, type: !44)
|
!68 = !DILocation(line: 33, column: 31, scope: !64)
|
||||||
!69 = !DILocation(line: 33, column: 49, scope: !63)
|
!69 = !DILocalVariable(name: "flags", arg: 2, scope: !64, file: !5, line: 33, type: !45)
|
||||||
!70 = !DILocalVariable(name: "name", arg: 3, scope: !63, file: !5, line: 33, type: !37)
|
!70 = !DILocation(line: 33, column: 49, scope: !64)
|
||||||
!71 = !DILocation(line: 33, column: 63, scope: !63)
|
!71 = !DILocalVariable(name: "name", arg: 3, scope: !64, file: !5, line: 33, type: !37)
|
||||||
!72 = !DILocation(line:
|
!72 = !DILocation(line: 33, column: 63, scope: !64)
|
||||||
!73 = distinct !DISubprogram(name: "new", linkageName: "new", scope: !74, file: !74
|
!73 = !DILocation(line:
|
||||||
!74 = !DIFile(filename: "mem.c3"
|
!74 = distinct !DISubprogram(name: "new", linkageName: "new", scope: !75, file: !75, line: 597, scopeLine: 597, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !4)
|
||||||
!75 = !DILocation(line: 34, column: 15, scope: !63)
|
!75 = !DIFile(filename: "mem.c3"
|
||||||
!76 = distinct !DISubprogram(name: "test", linkageName: "test.test", scope: !5, file: !5, line: 41, type: !77, scopeLine: 41, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition
|
!76 = !DILocation(line: 34, column: 15, scope: !64)
|
||||||
!77 = !DISubroutineType(types: !78)
|
!77 = distinct !DISubprogram(name: "test", linkageName: "test.test", scope: !5, file: !5, line: 41, type: !78, scopeLine: 41, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !4, retainedNodes: !19)
|
||||||
!78 = !{!49, !79}
|
!78 = !DISubroutineType(types: !79)
|
||||||
!79 = !DIDerivedType(tag: DW_TAG_typedef, name: "Color", scope: !5, file: !5, line: 79, baseType: !80, align: 16)
|
!79 = !{!50, !80}
|
||||||
!80 = !DICompositeType(tag: DW_TAG_array_type, baseType: !81, size: 128, align: 32, flags: DIFlagVector, elements: !82)
|
!80 = !DIDerivedType(tag: DW_TAG_typedef, name: "Color", scope: !5, file: !5, line: 79, baseType: !81, align: 16)
|
||||||
!81 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
|
!81 = !DICompositeType(tag: DW_TAG_array_type, baseType: !82, size: 128, align: 32, flags: DIFlagVector, elements: !83)
|
||||||
!82 = !{!83}
|
!82 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
|
||||||
!83 = !DISubrange(count: 4, lowerBound: 0)
|
!83 = !{!84}
|
||||||
!84 = !DILocalVariable(name: "color", arg: 1, scope: !76, file: !5, line: 41, type: !79)
|
!84 = !DISubrange(count: 4, lowerBound: 0)
|
||||||
!85 = !DILocation(line: 41, column: 20, scope: !76)
|
!85 = !DILocalVariable(name: "color", arg: 1, scope: !77, file: !5, line: 41, type: !80)
|
||||||
!86 = !DILocation
|
!86 = !DILocation(line: 41, column: 20, scope: !77)
|
||||||
!87 = distinct !DISubprogram(name: "printn", linkageName: "printn"
|
!87 = !DILocation
|
||||||
!88 = !DIFile(filename: "io.c3"
|
!88 = distinct !DISubprogram(name: "printn", linkageName: "printn"
|
||||||
!89 = !DILocation(line: 42, column: 7, scope: !76)
|
!89 = !DIFile(filename: "io.c3"
|
||||||
!90 = !DILocalVariable(name: "len"
|
!90 = !DILocation(line: 42, column: 7, scope: !77)
|
||||||
!91 = distinct !DISubprogram(name: "fprintn", linkageName: "fprintn"
|
!91 = !DILocalVariable(name: "len"
|
||||||
!92 = !DILocation
|
!92 = distinct !DISubprogram(name: "fprintn", linkageName: "fprintn", scope: !89, file: !89, line: 166, scopeLine: 166, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !4, retainedNodes: !19)
|
||||||
!93 = !DILocation
|
!93 = !DILocation
|
||||||
!94 = !DILocation
|
!94 = !DILocation
|
||||||
!95 = distinct !DISubprogram(name: "fprint", linkageName: "fprint"
|
!95 = !DILocation
|
||||||
!96 = !DILocation
|
!96 = distinct !DISubprogram(name: "fprint", linkageName: "fprint"
|
||||||
!97 = !DILocation
|
!97 = !DILocation
|
||||||
!98 = !DILocation
|
!98 = !DILocation
|
||||||
!99 = !DILocation
|
!99 = !DILocation
|
||||||
@@ -647,93 +688,93 @@ no_match: ; preds = %compare
|
|||||||
!101 = !DILocation
|
!101 = !DILocation
|
||||||
!102 = !DILocation
|
!102 = !DILocation
|
||||||
!103 = !DILocation
|
!103 = !DILocation
|
||||||
!104 = distinct !DISubprogram(name: "test2", linkageName: "test.test2", scope: !5, file: !5, line: 48, type: !105, scopeLine: 48, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition
|
!104 = !DILocation
|
||||||
!105 = !DISubroutineType(types: !106)
|
!105 = distinct !DISubprogram(name: "test2", linkageName: "test.test2", scope: !5, file: !5, line: 48, type: !106, scopeLine: 48, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition
|
||||||
!106 = !{!12}
|
!106 = !DISubroutineType(types: !107)
|
||||||
!107 = !DILocalVariable(name: "scratch", scope: !108, file: !5, line: 110, type: !109, align: 8)
|
!107 = !{!12}
|
||||||
!108 = distinct !DISubprogram(name: "@scratch", linkageName: "@scratch", scope: !5, file: !5, line: 109, scopeLine: 109, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
!108 = !DILocalVariable(name: "scratch", scope: !109, file: !5, line: 110, type: !110, align: 8)
|
||||||
!109 = !DICompositeType(tag: DW_TAG_structure_type, name: "Arena_Cursor", scope: !5, file: !5, line: 88, size: 128, align: 64, elements: !110, identifier: "foo__Arena_Cursor")
|
!109 = distinct !DISubprogram(name: "@scratch", linkageName: "@scratch", scope: !5, file: !5, line: 109, scopeLine: 109, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
||||||
!110 = !{!111, !116}
|
!110 = !DICompositeType(tag: DW_TAG_structure_type, name: "Arena_Cursor", scope: !5, file: !5, line: 88, size: 128, align: 64, elements: !111, identifier: "foo__Arena_Cursor")
|
||||||
!111 = !DIDerivedType(tag: DW_TAG_member, name: "arena", scope: !109, file: !5, line: 89, baseType: !112, size: 64, align: 64)
|
!111 = !{!112, !117}
|
||||||
!112 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "Arena*", baseType: !113, size: 64, align: 64, dwarfAddressSpace: 0)
|
!112 = !DIDerivedType(tag: DW_TAG_member, name: "arena", scope: !110, file: !5, line: 89, baseType: !113, size: 64, align: 64)
|
||||||
!113 = !DICompositeType(tag: DW_TAG_structure_type, name: "Arena", scope: !5, file: !5, line: 84, size: 64, align: 64, elements: !114, identifier: "foo__Arena")
|
!113 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "Arena*", baseType: !114, size: 64, align: 64, dwarfAddressSpace: 0)
|
||||||
!114 = !{!115}
|
!114 = !DICompositeType(tag: DW_TAG_structure_type, name: "Arena", scope: !5, file: !5, line: 84, size: 64, align: 64, elements: !115, identifier: "foo__Arena")
|
||||||
!115 = !DIDerivedType(tag: DW_TAG_member, name: "cursor", scope: !113, file: !5, line: 85, baseType: !44, size: 64, align: 64)
|
!115 = !{!116}
|
||||||
!116 = !DIDerivedType(tag: DW_TAG_member, name: "cursor", scope: !109, file: !5, line: 90, baseType: !44, size: 64, align: 64, offset: 64)
|
!116 = !DIDerivedType(tag: DW_TAG_member, name: "cursor", scope: !114, file: !5, line: 85, baseType: !44, size: 64, align: 64)
|
||||||
!117 = !DILocation
|
!117 = !DIDerivedType(tag: DW_TAG_member, name: "cursor", scope: !110, file: !5, line: 90, baseType: !44, size: 64, align: 64, offset: 64)
|
||||||
!118 = !DILocation(line: 50, column: 3, scope: !104)
|
!118 = !DILocation
|
||||||
!119 = !DILocation
|
!119 = !DILocation(line: 50, column: 3, scope: !105)
|
||||||
!120 = !DILocation
|
!120 = !DILocation
|
||||||
!121 = !DILocalVariable(name: "scratch", scope: !104, file: !5, line: 50, type: !112, align: 8)
|
!121 = !DILocation
|
||||||
!122 = !DILocation(line: 50, column: 21, scope: !104)
|
!122 = !DILocalVariable(name: "scratch", scope: !105, file: !5, line: 50, type: !113, align: 8)
|
||||||
!123 = !DILocation
|
!123 = !DILocation(line: 50, column: 21, scope: !105)
|
||||||
!124 = distinct !DILexicalBlock(scope: !108, file: !5, line: 112, column: 3)
|
!124 = !DILocation
|
||||||
!125 = !DILocalVariable(name: "asdf", scope: !126, file: !5, line: 51, type: !12, align: 8)
|
!125 = distinct !DILexicalBlock(scope: !109, file: !5, line: 112, column: 3)
|
||||||
!126 = distinct !DILexicalBlock(scope: !104, file: !5, line: 50, column: 30)
|
!126 = !DILocalVariable(name: "asdf", scope: !127, file: !5, line: 51, type: !12, align: 8)
|
||||||
!127 = !DILocation(line: 51, column: 11, scope: !126)
|
!127 = distinct !DILexicalBlock(scope: !105, file: !5, line: 50, column: 30)
|
||||||
!128 = !DILocation(line: 52, column: 12, scope: !126)
|
!128 = !DILocation(line: 51, column: 11, scope: !127)
|
||||||
!129 = !DILocation
|
!129 = !DILocation(line: 52, column: 12, scope: !127)
|
||||||
!130 = distinct !DILexicalBlock(scope: !108, file: !5, line: 111, column: 9)
|
!130 = !DILocation
|
||||||
!131 = !DILocation
|
!131 = distinct !DILexicalBlock(scope: !109, file: !5, line: 111, column: 9)
|
||||||
!132 = distinct !DISubprogram(name: "_$main", linkageName: "main", scope: !5, file: !5, line: 15, type: !133, scopeLine: 15, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition
|
!132 = !DILocation
|
||||||
!133 = !DISubroutineType(types: !134)
|
!133 = distinct !DISubprogram(name: "_$main", linkageName: "main", scope: !5, file: !5, line: 15, type: !134, scopeLine: 15, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !4, retainedNodes: !19)
|
||||||
!134 = !{!13, !13, !135}
|
!134 = !DISubroutineType(types: !135)
|
||||||
!135 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "char**", baseType: !41, size: 64, align: 64
|
!135 = !{!13, !13, !136}
|
||||||
!136 = !DILocalVariable(name: ".anon", arg: 1, scope: !132, file: !5, line: 15, type: !13)
|
!136 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "char**", baseType: !41, size: 64, align: 64
|
||||||
!137 = !DILocation(line: 15, column: 8, scope: !132)
|
!137 = !DILocalVariable(name: ".anon", arg: 1, scope: !133, file: !5, line: 15, type: !13)
|
||||||
!138 = !DILocalVariable(name: ".anon", arg: 2, scope: !132, file: !5, line: 15, type: !135)
|
!138 = !DILocation(line: 15, column: 8, scope: !133)
|
||||||
!139 = !DILocalVariable(name: "list", scope: !140, file: !5, line: 45, type: !33, align: 8)
|
!139 = !DILocalVariable(name: ".anon", arg: 2, scope: !133, file: !5, line: 15, type: !136)
|
||||||
!140 = distinct !DISubprogram(name: "@main_to_int_main_args", linkageName: "@main_to_int_main_args"
|
!140 = !DILocalVariable(name: "list", scope: !141, file: !5, line: 45, type: !33, align: 8)
|
||||||
!141 = !DIFile(filename: "main_stub.c3"
|
!141 = distinct !DISubprogram(name: "@main_to_int_main_args", linkageName: "@main_to_int_main_args"
|
||||||
!142 = !DILocation
|
!142 = !DIFile(filename: "main_stub.c3"
|
||||||
!143 = !DILocalVariable(name: "list", scope: !144, file: !5, line: 24, type: !33, align: 8)
|
!143 = !DILocation
|
||||||
!144 = distinct !DISubprogram(name: "args_to_strings"
|
!144 = !DILocalVariable(name: "list", scope: !145, file: !5, line: 24, type: !33, align: 8)
|
||||||
!145 = !DILocation
|
!145 = distinct !DISubprogram(name: "args_to_strings", linkageName: "args_to_strings", scope: !142, file: !142, line: 22, scopeLine: 22, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !4, retainedNodes: !19)
|
||||||
!146 = !DILocation
|
!146 = !DILocation
|
||||||
!147 = !DILocation
|
!147 = !DILocation
|
||||||
!148 = !DILocation
|
!148 = !DILocation
|
||||||
!149 = distinct !DISubprogram(name: "alloc_array_try", linkageName: "alloc_array_try"
|
!149 = !DILocation
|
||||||
!150 = !DIFile(filename: "mem_allocator.c3"
|
!150 = distinct !DISubprogram(name: "alloc_array_try", linkageName: "alloc_array_try"
|
||||||
!151 = !DILocation
|
!151 = !DIFile(filename: "mem_allocator.c3"
|
||||||
!152 = distinct !DISubprogram(name: "alloc_array", linkageName: "alloc_array"
|
!152 = !DILocation
|
||||||
!153 = !DILocation
|
!153 = distinct !DISubprogram(name: "alloc_array", linkageName: "alloc_array"
|
||||||
!154 = distinct !DISubprogram(name: "alloc_array", linkageName: "alloc_array"
|
!154 = !DILocation
|
||||||
!155 = !DILocation
|
!155 = distinct !DISubprogram(name: "alloc_array", linkageName: "alloc_array"
|
||||||
!156 = !DILocation
|
!156 = !DILocation
|
||||||
!157 = !DILocation
|
!157 = !DILocation
|
||||||
!158 = distinct !DISubprogram(name: "malloc_try", linkageName: "malloc_try", scope: !150, file: !150, line: 60, scopeLine: 60, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
!158 = !DILocation
|
||||||
!159 = !DILocation
|
!159 = distinct !DISubprogram(name: "malloc_try", linkageName: "malloc_try", scope: !151, file: !151, line: 60, scopeLine: 60, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !4)
|
||||||
!160 = !DILocation
|
!160 = !DILocation
|
||||||
!161 = !DILocation
|
!161 = !DILocation
|
||||||
!162 = distinct !DISubprogram(name: "[DEFAULT INIT]", linkageName: "[DEFAULT INIT]", scope: !150, file: !150, line: 28, scopeLine: 28, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
!162 = !DILocation
|
||||||
!163 = !DILocation
|
!163 = distinct !DISubprogram(name: "[DEFAULT INIT]", linkageName: "[DEFAULT INIT]", scope: !151, file: !151, line: 28, scopeLine: 28, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !4)
|
||||||
!164 = !DILocation
|
!164 = !DILocation
|
||||||
!165 = !DILocalVariable(name: "i", scope: !166, file: !5, line: 25, type: !13, align: 4)
|
!165 = !DILocation
|
||||||
!166 = distinct !DILexicalBlock(scope: !144, file: !141, line: 25, column: 2)
|
!166 = !DILocalVariable(name: "i", scope: !167, file: !5, line: 25, type: !13, align: 4)
|
||||||
!167 = !DILocation
|
!167 = distinct !DILexicalBlock(scope: !145, file: !142, line: 25, column: 2)
|
||||||
!168 = !DILocation
|
!168 = !DILocation
|
||||||
!169 = !DILocation
|
!169 = !DILocation
|
||||||
!170 = !DILocation
|
!170 = !DILocation
|
||||||
!171 = !DILocalVariable(name: "arg", scope: !172, file: !5, line: 27, type: !41, align: 8)
|
!171 = !DILocation
|
||||||
!172 = distinct !DILexicalBlock(scope: !166, file: !141, line: 26, column: 2)
|
!172 = !DILocalVariable(name: "arg", scope: !173, file: !5, line: 27, type: !41, align: 8)
|
||||||
!173 = !DILocation
|
!173 = distinct !DILexicalBlock(scope: !167, file: !142, line: 26, column: 2)
|
||||||
!174 = !DILocation
|
!174 = !DILocation
|
||||||
!175 = !DILocation
|
!175 = !DILocation
|
||||||
!176 = !DILocalVariable(name: "len", scope: !172, file: !5, line: 28, type: !44, align: 8)
|
!176 = !DILocation
|
||||||
!177 = !DILocation
|
!177 = !DILocalVariable(name: "len", scope: !173, file: !5, line: 28, type: !44, align: 8)
|
||||||
!178 = !DILocation
|
!178 = !DILocation
|
||||||
!179 = !DILocation
|
!179 = !DILocation
|
||||||
!180 = !DILocation
|
!180 = !DILocation
|
||||||
!181 = !DILocation
|
!181 = !DILocation
|
||||||
!182 = !DILocalVariable(name: "len", scope: !183, file: !5, line: 5, type: !44, align: 8)
|
!182 = !DILocation
|
||||||
!183 = distinct !DISubprogram(name: "_strlen", linkageName: "_strlen", scope: !141, file: !141, line: 3, scopeLine: 3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
!183 = !DILocalVariable(name: "len", scope: !184, file: !5, line: 5, type: !44, align: 8)
|
||||||
!184 = !DILocation
|
!184 = distinct !DISubprogram(name: "_strlen", linkageName: "_strlen", scope: !142, file: !142, line: 3, scopeLine: 3, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition
|
||||||
!185 = !DILocation
|
!185 = !DILocation
|
||||||
!186 = !DILocation
|
!186 = !DILocation
|
||||||
!187 = !DILocation
|
!187 = !DILocation
|
||||||
!188 = !DILocation
|
!188 = !DILocation
|
||||||
!189 = distinct !DILexicalBlock(scope: !183, file: !141, line: 6, column: 2)
|
!189 = !DILocation
|
||||||
!190 = !DILocation
|
!190 = distinct !DILexicalBlock(scope: !184, file: !142, line: 6, column: 2)
|
||||||
!191 = !DILocation
|
!191 = !DILocation
|
||||||
!192 = !DILocation
|
!192 = !DILocation
|
||||||
!193 = !DILocation
|
!193 = !DILocation
|
||||||
@@ -741,5 +782,6 @@ no_match: ; preds = %compare
|
|||||||
!195 = !DILocation
|
!195 = !DILocation
|
||||||
!196 = !DILocation
|
!196 = !DILocation
|
||||||
!197 = !DILocation
|
!197 = !DILocation
|
||||||
!198 = distinct !DILexicalBlock(scope: !140, file: !141, line: 46, column: 8)
|
!198 = !DILocation
|
||||||
!199 = !DILocation
|
!199 = distinct !DILexicalBlock(scope: !141,
|
||||||
|
!200 = !DILocation
|
||||||
@@ -22,51 +22,52 @@ entry:
|
|||||||
store ptr %0, ptr %args, align 8
|
store ptr %0, ptr %args, align 8
|
||||||
%ptradd = getelementptr inbounds i8, ptr %args, i64 8
|
%ptradd = getelementptr inbounds i8, ptr %args, i64 8
|
||||||
store i64 %1, ptr %ptradd, align 8
|
store i64 %1, ptr %ptradd, align 8
|
||||||
!24
|
!24
|
||||||
!27
|
!26
|
||||||
%ptradd1 = getelementptr inbounds i8, ptr %args, i64 8, !dbg !27
|
%ptradd1 = getelementptr inbounds i8, ptr %args, i64 8, !dbg !28
|
||||||
%2 = load i64, ptr %ptradd1, align 8, !dbg !27
|
%2 = load i64, ptr %ptradd1, align 8, !dbg !28
|
||||||
store i64 %2, ptr %.anon, align 8, !dbg !27
|
store i64 %2, ptr %.anon, align 8, !dbg !28
|
||||||
!27
|
!26
|
||||||
store i64 0, ptr %.anon2, align 8, !dbg !27
|
store i64 0, ptr %.anon2, align 8, !dbg !28
|
||||||
br label %loop.cond, !dbg !27
|
br label %loop.cond, !dbg !28
|
||||||
|
|
||||||
loop.cond: ; preds = %loop.body, %entry
|
loop.cond: ; preds = %loop.body, %entry
|
||||||
%3 = load i64, ptr %.anon2, align 8, !dbg !27
|
%3 = load i64, ptr %.anon2, align 8, !dbg !28
|
||||||
%4 = load i64, ptr %.anon, align 8, !dbg !27
|
%4 = load i64, ptr %.anon, align 8, !dbg !28
|
||||||
%lt = icmp ult i64 %3, %4, !dbg !27
|
%lt = icmp ult i64 %3, %4, !dbg !28
|
||||||
br i1 %lt, label %loop.body, label %loop.exit, !dbg !27
|
br i1 %lt, label %loop.body, label %loop.exit, !dbg !28
|
||||||
|
|
||||||
loop.body: ; preds = %loop.cond
|
loop.body: ; preds = %loop.cond
|
||||||
!30
|
!29
|
||||||
%5 = load ptr, ptr %args, align 8, !dbg !31
|
%5 = load ptr, ptr %args, align 8, !dbg !32
|
||||||
%6 = load i64, ptr %.anon2, align 8, !dbg !31
|
%6 = load i64, ptr %.anon2, align 8, !dbg !32
|
||||||
%ptroffset = getelementptr inbounds [16 x i8], ptr %5, i64 %6, !dbg !31
|
%ptroffset = getelementptr inbounds [16 x i8], ptr %5, i64 %6, !dbg !32
|
||||||
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %a, ptr align 8 %ptroffset, i32 16, i1 false), !dbg !31
|
call void @llvm.memcpy.p0.p0.i32(ptr align 8 %a, ptr align 8 %ptroffset, i32 16, i1 false), !dbg !32
|
||||||
!35
|
!33
|
||||||
%ptradd3 = getelementptr inbounds i8, ptr %a, i64 8, !dbg !36
|
%ptradd3 = getelementptr inbounds i8, ptr %a, i64 8, !dbg !37
|
||||||
%7 = load i64, ptr %ptradd3, align 8, !dbg !36
|
%7 = load i64, ptr %ptradd3, align 8, !dbg !37
|
||||||
%trunc = trunc i64 %7 to i32, !dbg !36
|
%trunc = trunc i64 %7 to i32, !dbg !37
|
||||||
store i32 %trunc, ptr %x, align 4, !dbg !36
|
store i32 %trunc, ptr %x, align 4, !dbg !37
|
||||||
%8 = load i64, ptr %.anon2, align 8, !dbg !27
|
%8 = load i64, ptr %.anon2, align 8, !dbg !28
|
||||||
%addnuw = add nuw i64 %8, 1, !dbg !27
|
%addnuw = add nuw i64 %8, 1, !dbg !28
|
||||||
store i64 %addnuw, ptr %.anon2, align 8, !dbg !27
|
store i64 %addnuw, ptr %.anon2, align 8, !dbg !28
|
||||||
br label %loop.cond, !dbg !27
|
br label %loop.cond, !dbg !28
|
||||||
|
|
||||||
loop.exit: ; preds = %loop.cond
|
loop.exit: ; preds = %loop.cond
|
||||||
ret void, !dbg !27
|
ret void, !dbg !28
|
||||||
}
|
}
|
||||||
|
|
||||||
!23 = !DILocalVariable(name: "args", arg: 1, scope: !6, file: !5, line: 3, type: !9)
|
!24 = !DILocalVariable(name: "args", arg: 1, scope: !6, file: !5, line: 3, type: !9)
|
||||||
!24 = !DILocation(line: 3, column: 22, scope: !6)
|
!25 = !DILocation(line: 3, column: 22, scope: !6)
|
||||||
!25 = !DILocalVariable(name: ".temp", scope: !26, file: !5, line: 5, type: !20, align: 8)
|
!26 = !DILocalVariable(name: ".temp", scope: !27, file: !5, line: 5, type: !20, align: 8)
|
||||||
!26 = distinct !DILexicalBlock(scope: !6, file: !5, line: 5, column: 2)
|
!27 = distinct !DILexicalBlock(scope: !6, file: !5, line: 5, column: 2)
|
||||||
!27 = !DILocation(line: 5, column: 15, scope: !26)
|
!28 = !DILocation(line: 5, column: 15, scope: !27)
|
||||||
!28 = !DILocalVariable(name: "a", scope: !29, file: !5, line: 5, type: !13, align: 8)
|
!29 = !DILocalVariable(name: "a", scope: !30, file: !5, line: 5, type: !13, align: 8)
|
||||||
!29 = distinct !DILexicalBlock(scope: !26, file: !5, line: 6, column: 2)
|
!30 = distinct !DILexicalBlock(scope: !27, file: !5, line: 6, column: 2)
|
||||||
!30 = !DILocation(line: 5, column: 11, scope: !29)
|
!31 = !DILocation(line: 5, column: 11, scope: !30)
|
||||||
!31 = !DILocation(line: 5, column: 15, scope: !29)
|
!32 = !DILocation(line: 5, column: 15, scope: !30)
|
||||||
!32 = !DILocalVariable(name: "x", scope: !33, file: !5, line: 7, type: !34, align: 4)
|
!33 = !DILocalVariable(name: "x", scope: !34, file: !5, line: 7, type: !35, align: 4)
|
||||||
!33 = distinct !DILexicalBlock(scope: !29, file: !5, line: 6, column: 2)
|
!34 = distinct !DILexicalBlock(scope: !30, file: !5, line: 6, column: 2)
|
||||||
!34 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
!35 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||||
!35 = !DILocation(line: 7, column: 7, scope: !33)
|
!36 = !DILocation(line: 7, column: 7, scope: !34)
|
||||||
!36 = !DILocation(line: 7, column: 11, scope: !33)
|
!37 = !DILocation(line: 7, column: 11, scope: !34)
|
||||||
|
|||||||
Reference in New Issue
Block a user