mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Destroy temporaries at the end of expression statements. (#7513)
Instead of tracking the cleanup scope depth on entry to each scope, track an "ambient" cleanup scope depth that's *after* the destructors of local variables in that scope. This gets increased to include the destructors of local variables when we create a name-binding declaration. Then, when we reach a point where temporaries should be destroyed, run cleanups that are after the ambient cleanup scope depth on the stack. This happens: * At the `;` of a statement expression. * At the `)` of an `if` or `while` statement. * After performing the implied `HasValue()` call in a `for` statement. Per informal agreement with leads, this means we lifetime-extend all temporaries created in the initializer of a name-binding declaration to the full scope of that declaration, but that temporaries created in an expression statement are destroyed at the `;`.
This commit is contained in:
@@ -23,8 +23,6 @@ fn G();
|
||||
|
||||
fn CallF() {
|
||||
F({});
|
||||
// TODO: The `C` instance is destroyed after the call to `G()`, and
|
||||
// should be destroyed before.
|
||||
G();
|
||||
}
|
||||
|
||||
@@ -41,8 +39,6 @@ fn G();
|
||||
|
||||
fn CallF() {
|
||||
F({});
|
||||
// TODO: The `C` instance is destroyed after the call to `G()`, and
|
||||
// should be destroyed before.
|
||||
G();
|
||||
}
|
||||
|
||||
@@ -93,8 +89,8 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: %.loc12_6.2.temp = alloca {}, align 1, !dbg !14
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc12_6.2.temp), !dbg !14
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr @C.val.loc12_6.6), !dbg !15
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !16
|
||||
// CHECK:STDOUT: call void @"_COp.807eb4f2d3ed7e54:core.Destroy.Core"(ptr @C.val), !dbg !14
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !16
|
||||
// CHECK:STDOUT: ret void, !dbg !17
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -129,7 +125,7 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !13 = !{null}
|
||||
// CHECK:STDOUT: !14 = !DILocation(line: 12, column: 5, scope: !11)
|
||||
// CHECK:STDOUT: !15 = !DILocation(line: 12, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 15, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 13, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !17 = !DILocation(line: 11, column: 1, scope: !11)
|
||||
// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 12, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19)
|
||||
// CHECK:STDOUT: !19 = !{!20}
|
||||
@@ -157,8 +153,8 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var), !dbg !14
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var, ptr align 1 @C.val.loc6, i64 0, i1 false), !dbg !14
|
||||
// CHECK:STDOUT: call void @_CF.Main(ptr %_.var), !dbg !15
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !16
|
||||
// CHECK:STDOUT: call void @"_COp.807eb4f2d3ed7e54:core.Destroy.Core"(ptr %_.var), !dbg !14
|
||||
// CHECK:STDOUT: call void @_CG.Main(), !dbg !16
|
||||
// CHECK:STDOUT: ret void, !dbg !17
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -196,7 +192,7 @@ fn InitLet() {
|
||||
// CHECK:STDOUT: !13 = !{null}
|
||||
// CHECK:STDOUT: !14 = !DILocation(line: 6, column: 6, scope: !11)
|
||||
// CHECK:STDOUT: !15 = !DILocation(line: 12, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 15, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 13, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !17 = !DILocation(line: 11, column: 1, scope: !11)
|
||||
// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "Op", linkageName: "_COp.807eb4f2d3ed7e54:core.Destroy.Core", scope: null, file: !1, line: 6, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !19)
|
||||
// CHECK:STDOUT: !19 = !{!20}
|
||||
|
||||
+22
-20
@@ -24,6 +24,8 @@ fn Call() {
|
||||
OneVar_i32(1);
|
||||
OneVar_X({});
|
||||
TwoVars(1, {});
|
||||
// TODO: This passes a global as the `X` parameter, then destroys a different
|
||||
// `X` global. We shouldn't be calling Destroy on a global.
|
||||
VarThenLet(1, {});
|
||||
LetThenVar(1, {});
|
||||
}
|
||||
@@ -73,44 +75,44 @@ fn Call() {
|
||||
// CHECK:STDOUT: %_.var.loc18_12 = alloca i32, align 4, !dbg !40
|
||||
// CHECK:STDOUT: %_.var.loc18_24 = alloca {}, align 1, !dbg !41
|
||||
// CHECK:STDOUT: %_.var.loc20 = alloca i32, align 4, !dbg !42
|
||||
// CHECK:STDOUT: %.loc27_18.2.temp = alloca {}, align 1, !dbg !43
|
||||
// CHECK:STDOUT: %.loc29_18.2.temp = alloca {}, align 1, !dbg !43
|
||||
// CHECK:STDOUT: %_.var.loc21 = alloca {}, align 1, !dbg !44
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc15), !dbg !38
|
||||
// CHECK:STDOUT: store i32 1, ptr %_.var.loc15, align 4, !dbg !38
|
||||
// CHECK:STDOUT: call void @_COneVar_i32.Main(ptr %_.var.loc15), !dbg !45
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %_.var.loc15), !dbg !38
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc16), !dbg !39
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc16, ptr align 1 @X.val.loc16, i64 0, i1 false), !dbg !39
|
||||
// CHECK:STDOUT: call void @_COneVar_X.Main(ptr %_.var.loc16), !dbg !46
|
||||
// CHECK:STDOUT: call void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr %_.var.loc16), !dbg !39
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18_12), !dbg !40
|
||||
// CHECK:STDOUT: store i32 1, ptr %_.var.loc18_12, align 4, !dbg !40
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc18_24), !dbg !41
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc18_24, ptr align 1 @X.val.loc16, i64 0, i1 false), !dbg !41
|
||||
// CHECK:STDOUT: call void @_CTwoVars.Main(ptr %_.var.loc18_12, ptr %_.var.loc18_24), !dbg !47
|
||||
// CHECK:STDOUT: call void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr %_.var.loc18_24), !dbg !41
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %_.var.loc18_12), !dbg !40
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc20), !dbg !42
|
||||
// CHECK:STDOUT: store i32 1, ptr %_.var.loc20, align 4, !dbg !42
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc27_18.2.temp), !dbg !43
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_18.2.temp), !dbg !43
|
||||
// CHECK:STDOUT: call void @_CVarThenLet.Main(ptr %_.var.loc20, ptr @X.val.loc16), !dbg !48
|
||||
// CHECK:STDOUT: call void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr @X.val), !dbg !43
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %_.var.loc20), !dbg !42
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %_.var.loc21), !dbg !44
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %_.var.loc21, ptr align 1 @X.val.loc16, i64 0, i1 false), !dbg !44
|
||||
// CHECK:STDOUT: call void @_CLetThenVar.Main(i32 1, ptr %_.var.loc21), !dbg !49
|
||||
// CHECK:STDOUT: call void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr %_.var.loc21), !dbg !44
|
||||
// CHECK:STDOUT: call void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr @X.val), !dbg !43
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %_.var.loc20), !dbg !42
|
||||
// CHECK:STDOUT: call void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr %_.var.loc18_24), !dbg !41
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %_.var.loc18_12), !dbg !40
|
||||
// CHECK:STDOUT: call void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr %_.var.loc16), !dbg !39
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %_.var.loc15), !dbg !38
|
||||
// CHECK:STDOUT: ret void, !dbg !50
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr %self) #0 !dbg !51 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %self) #0 !dbg !51 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !54
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %self) #0 !dbg !55 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.429fc69ea0bf165d:core.Destroy.Core"(ptr %self) #0 !dbg !55 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !58
|
||||
// CHECK:STDOUT: }
|
||||
@@ -122,8 +124,8 @@ fn Call() {
|
||||
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; uselistorder directives
|
||||
// CHECK:STDOUT: uselistorder ptr @"_COp.429fc69ea0bf165d:core.Destroy.Core", { 3, 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @"_COp.5e27612b9dd31a14:core.Destroy.Core", { 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @"_COp.429fc69ea0bf165d:core.Destroy.Core", { 3, 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 6, 5, 4, 3, 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.memcpy.p0.p0.i64, { 2, 1, 0 }
|
||||
// CHECK:STDOUT:
|
||||
@@ -176,20 +178,20 @@ fn Call() {
|
||||
// CHECK:STDOUT: !40 = !DILocation(line: 18, column: 12, scope: !35)
|
||||
// CHECK:STDOUT: !41 = !DILocation(line: 18, column: 24, scope: !35)
|
||||
// CHECK:STDOUT: !42 = !DILocation(line: 20, column: 15, scope: !35)
|
||||
// CHECK:STDOUT: !43 = !DILocation(line: 27, column: 17, scope: !35)
|
||||
// CHECK:STDOUT: !43 = !DILocation(line: 29, column: 17, scope: !35)
|
||||
// CHECK:STDOUT: !44 = !DILocation(line: 21, column: 23, scope: !35)
|
||||
// CHECK:STDOUT: !45 = !DILocation(line: 24, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !46 = !DILocation(line: 25, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !47 = !DILocation(line: 26, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !48 = !DILocation(line: 27, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !49 = !DILocation(line: 28, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !48 = !DILocation(line: 29, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !49 = !DILocation(line: 30, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !50 = !DILocation(line: 23, column: 1, scope: !35)
|
||||
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !1, line: 21, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !52)
|
||||
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 15, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !52)
|
||||
// CHECK:STDOUT: !52 = !{!53}
|
||||
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !51, type: !14)
|
||||
// CHECK:STDOUT: !54 = !DILocation(line: 21, column: 23, scope: !51)
|
||||
// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Op", linkageName: "_COp.5e27612b9dd31a14:core.Destroy.Core", scope: null, file: !1, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56)
|
||||
// CHECK:STDOUT: !53 = !DILocalVariable(arg: 1, scope: !51, type: !7)
|
||||
// CHECK:STDOUT: !54 = !DILocation(line: 15, column: 15, scope: !51)
|
||||
// CHECK:STDOUT: !55 = distinct !DISubprogram(name: "Op", linkageName: "_COp.429fc69ea0bf165d:core.Destroy.Core", scope: null, file: !1, line: 16, type: !12, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !56)
|
||||
// CHECK:STDOUT: !56 = !{!57}
|
||||
// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !7)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 20, column: 15, scope: !55)
|
||||
// CHECK:STDOUT: !57 = !DILocalVariable(arg: 1, scope: !55, type: !14)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 16, column: 13, scope: !55)
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -137,6 +137,7 @@ fn M() {
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !51
|
||||
// CHECK:STDOUT: %H.call.loc29 = call i32 @_CH.Main.5bd8d5767580997a(i32 %x), !dbg !51
|
||||
// CHECK:STDOUT: store i32 %H.call.loc29, ptr %.loc29_6.3.temp, align 4, !dbg !51
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !51
|
||||
// CHECK:STDOUT: %H.call.loc30 = call %type @_CH.Main.ee509b43cf4eb3c5(%type zeroinitializer), !dbg !60
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !52
|
||||
// CHECK:STDOUT: %G.call = call i32 @_CG.Main.58016a73bff04416(i32 %x), !dbg !52
|
||||
@@ -145,6 +146,8 @@ fn M() {
|
||||
// CHECK:STDOUT: %.loc31_8.5 = load i32, ptr %.loc31_8.3.temp, align 4, !dbg !52
|
||||
// CHECK:STDOUT: %H.call.loc31 = call i32 @_CH.Main.5bd8d5767580997a(i32 %.loc31_8.5), !dbg !53
|
||||
// CHECK:STDOUT: store i32 %H.call.loc31, ptr %.loc31_9.3.temp, align 4, !dbg !53
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !53
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !52
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !54
|
||||
// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !54
|
||||
// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !61
|
||||
@@ -167,9 +170,6 @@ fn M() {
|
||||
// CHECK:STDOUT: call void @"_COp.807eb4f2d3ed7e54:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !59
|
||||
// CHECK:STDOUT: call void @"_COp.807eb4f2d3ed7e54:core.Destroy.Core"(ptr %c.var), !dbg !58
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %var_f64.var), !dbg !54
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !53
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !52
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !51
|
||||
// CHECK:STDOUT: ret i32 %x, !dbg !69
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -194,6 +194,7 @@ fn M() {
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc29_6.3.temp), !dbg !77
|
||||
// CHECK:STDOUT: %H.call.loc29 = call double @_CH.Main.c27b765f2159c9a0(double %x), !dbg !77
|
||||
// CHECK:STDOUT: store double %H.call.loc29, ptr %.loc29_6.3.temp, align 8, !dbg !77
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !77
|
||||
// CHECK:STDOUT: %H.call.loc30 = call %type @_CH.Main.ee509b43cf4eb3c5(%type zeroinitializer), !dbg !86
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc31_8.3.temp), !dbg !78
|
||||
// CHECK:STDOUT: %G.call = call double @_CG.Main.fa1f0912a5bbe922(double %x), !dbg !78
|
||||
@@ -202,6 +203,8 @@ fn M() {
|
||||
// CHECK:STDOUT: %.loc31_8.5 = load double, ptr %.loc31_8.3.temp, align 8, !dbg !78
|
||||
// CHECK:STDOUT: %H.call.loc31 = call double @_CH.Main.c27b765f2159c9a0(double %.loc31_8.5), !dbg !79
|
||||
// CHECK:STDOUT: store double %H.call.loc31, ptr %.loc31_9.3.temp, align 8, !dbg !79
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !79
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !78
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var_f64.var), !dbg !80
|
||||
// CHECK:STDOUT: store double poison, ptr %var_f64.var, align 8, !dbg !80
|
||||
// CHECK:STDOUT: %.loc35_5 = load double, ptr %var_f64.var, align 8, !dbg !87
|
||||
@@ -224,9 +227,6 @@ fn M() {
|
||||
// CHECK:STDOUT: call void @"_COp.807eb4f2d3ed7e54:core.Destroy.Core"(ptr %.loc43_6.3.temp), !dbg !85
|
||||
// CHECK:STDOUT: call void @"_COp.807eb4f2d3ed7e54:core.Destroy.Core"(ptr %c.var), !dbg !84
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %var_f64.var), !dbg !80
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %.loc31_9.3.temp), !dbg !79
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %.loc31_8.3.temp), !dbg !78
|
||||
// CHECK:STDOUT: call void @"_COp.30d8007fdcc57f83:core.Destroy.Core"(ptr %.loc29_6.3.temp), !dbg !77
|
||||
// CHECK:STDOUT: ret double %x, !dbg !95
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -82,8 +82,8 @@ fn M() -> i32 {
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.3.temp), !dbg !32
|
||||
// CHECK:STDOUT: %H.call = call i32 @_CH.Main.5bd8d5767580997a(i32 %x), !dbg !32
|
||||
// CHECK:STDOUT: store i32 %H.call, ptr %.loc25_6.3.temp, align 4, !dbg !32
|
||||
// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %x), !dbg !33
|
||||
// CHECK:STDOUT: call void @"_COp.5e27612b9dd31a14:core.Destroy.Core"(ptr %.loc25_6.3.temp), !dbg !32
|
||||
// CHECK:STDOUT: call void @_CF.Main.84588f41d61dafba(i32 %x), !dbg !33
|
||||
// CHECK:STDOUT: ret i32 %x, !dbg !34
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user