File tree Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Expand file tree Collapse file tree 4 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,17 @@ int foo(int function() d = () { return 123; })
1414// CHECK-LABEL: define{{.*}} @{{.*}}D3mod8call_fooFZi
1515int call_foo ()
1616{
17- // CHECK: call {{.*}}D3mod3fooFPFZiZi{{.*}}D3mod9__lambda5FNaNbNiNfZi
17+ // CHECK: call {{.*}}D3mod3fooFPFZiZi{{.*}}D3mod15__lambda_L9_C28FNaNbNiNfZi
1818 return foo ();
1919}
2020
2121// The lambda is defined by the first call to foo with default arguments.
22- // CHECK-LABEL: define{{.*}} @{{.*}}D3mod9__lambda5FNaNbNiNfZi
22+ // CHECK-LABEL: define{{.*}} @{{.*}}D3mod15__lambda_L9_C28FNaNbNiNfZi
2323// CHECK: ret i32 123
2424
2525// CHECK-LABEL: define{{.*}} @{{.*}}Dmain
2626void main ()
2727{
28- // CHECK: call {{.*}}D3mod3fooFPFZiZi{{.*}}D3mod9__lambda5FNaNbNiNfZi
28+ // CHECK: call {{.*}}D3mod3fooFPFZiZi{{.*}}D3mod15__lambda_L9_C28FNaNbNiNfZi
2929 assert (foo() == 123 );
3030}
Original file line number Diff line number Diff line change @@ -26,21 +26,21 @@ void foo()
2626}
2727
2828// the global variables should be defined as internal:
29- // CHECK: _D14lambdas_gh36489__lambda5FZ10global_bari {{.*}} = internal thread_local global
30- // CHECK: _D14lambdas_gh36489__lambda6FZ18global_bar_inlinedOi {{.*}} = internal global
31- // CHECK: _D14lambdas_gh36483fooFZ__T9__lambda1TiZQnFiZ12lambda_templi {{.*}} = internal global
29+ // CHECK: _D14lambdas_gh364815__lambda_L5_C12FZ10global_bari {{.*}} = internal thread_local global
30+ // CHECK: _D14lambdas_gh364816__lambda_L10_C20FZ18global_bar_inlinedOi {{.*}} = internal global
31+ // CHECK: _D14lambdas_gh36483fooFZ__T15__lambda_L21_C5TiZQuFiZ12lambda_templi {{.*}} = internal global
3232
3333// foo() should only call two lambdas:
3434// CHECK: define {{.*}}_D14lambdas_gh36483fooFZv
35- // CHECK-NEXT: call {{.*}}__lambda5
36- // CHECK-NEXT: call {{.*}}__T9__lambda1
35+ // CHECK-NEXT: call {{.*}}__lambda_L5_C12
36+ // CHECK-NEXT: call {{.*}}__T15__lambda_L21_C5
3737// CHECK-NEXT: ret void
3838
3939// bar() should be defined as internal:
40- // CHECK: define internal {{.*}}__lambda5
40+ // CHECK: define internal {{.*}}__lambda_L5_C12
4141
4242// bar_inlined() should NOT have made it to the .ll:
43- // CHECK-NOT: define {{.*}}__lambda6
43+ // CHECK-NOT: define {{.*}}__lambda_L10_C20
4444
4545// the template lambda instance should be defined as internal:
46- // CHECK: define internal {{.*}}__T9__lambda1
46+ // CHECK: define internal {{.*}}__T15__lambda_L21_C5
Original file line number Diff line number Diff line change @@ -11,16 +11,16 @@ void foo()
1111}
1212
1313// the global variables should be defined as internal:
14- // CHECK: _D14lambdas_gh36489__lambda5FZ10global_bari {{.*}} = internal thread_local global
15- // CHECK: _D14lambdas_gh36489__lambda6FZ18global_bar_inlinedOi {{.*}} = internal global
14+ // CHECK: _D14lambdas_gh364815__lambda_L5_C12FZ10global_bari {{.*}} = internal thread_local global
15+ // CHECK: _D14lambdas_gh364816__lambda_L10_C20FZ18global_bar_inlinedOi {{.*}} = internal global
1616
1717// foo() should only call one lambda:
1818// CHECK: define {{.*}}_D15lambdas_gh3648b3fooFZv
19- // CHECK-NEXT: call {{.*}}__lambda5
19+ // CHECK-NEXT: call {{.*}}__lambda_L5_C12
2020// CHECK-NEXT: ret void
2121
2222// bar() should be defined as internal:
23- // CHECK: define internal {{.*}}__lambda5
23+ // CHECK: define internal {{.*}}__lambda_L5_C12
2424
2525// bar_inlined() should NOT have made it to the .ll:
26- // CHECK-NOT: define {{.*}}__lambda6
26+ // CHECK-NOT: define {{.*}}__lambda_L10_C20
Original file line number Diff line number Diff line change 11// COMPILE_SEPARATELY:
22// EXTRA_SOURCES: imports/test23722b.d
3- // REQUIRED_ARGS : -betterC
3+ // rEQUIRED_ARGS : -betterC // disabled for LDC as the test is 'buggy' and betterC not required at all
44// https://issues.dlang.org/show_bug.cgi?id=23722
55// Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code
66import imports.test23722b;
You can’t perform that action at this time.
0 commit comments