mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 00:08:12 +00:00
Defer evaluation of witnesses substituted while identifying a facet type (#7930)
When identifying a facet type, defer evaluation of LookupImplWitnesses by redirecting them to evaluate into IdentifiedWitness. Then the caller of identify will need to substitute the IdentifiedWitnesses, either with witnesses of their own, or with LookupImplWitness to cause a lookup operation. This allows: - An `impl as` on a named constraint can subst the witnesses in designators from the named constraint with a witness to the impl itself. This prevents them from looking for and finding some other overlapping impl. (This PR) - Impl lookup to collect rewrite/equality requirements from all named constraints and then use the impls it has already found to evaluate any designators in those requirements instead of performing impl lookup again (creating a cycle). (Done in https://github.com/carbon-language/carbon-lang/pull/7944) - Similarly, an `impl as` can collect impls and equality requirements from all named constraints and verify them correctly by replacing witnesses that should refer to the impl with the correct witness instead of performing a lookup and finding an overlapping impl. (Done in https://github.com/carbon-language/carbon-lang/pull/7937) - ImplWitnessAccess to be able to find rewrites from a named constraint, not just from the initial DeclaredFacetType. (TBD) To do this we need to introduce the concept of "identified" specifics. In order to identify a facet type, we must construct a specific for each require decl in a named constraint. These specifics will have IdentifiedWitnesses inside them, but their args would otherwise match a specific for the require decl constructed in another context. To avoid polluting the canonical specific namespace, we introduce a second namespace of specifics that are "identified" since they are created by identifying. As we have introduced a new global state that modifies eval behaviour, we must disable that state when resolving a specific (as per https://github.com/carbon-language/carbon-lang/pull/7923). But inside an "identified" specific, we preserve the behaviour so that the witnesses modified by identify (through SubstPeriodSelf or through evaluating a require specific) have their evaluation deferred.
This commit is contained in:
1 parent
66a250ad96
commit
24766e213e
609 files changed
+50120
-49529
No files matched your search
@@ -412,7 +412,7 @@ fn MyF() -> i32 {
|
||||
// CHECK:STDOUT: %SimpleReturnValue.call = call i32 @_Z17SimpleReturnValueii(i32 3, i32 4), !dbg !80
|
||||
// CHECK:STDOUT: store i32 %SimpleReturnValue.call, ptr %value.var, align 4, !dbg !79
|
||||
// CHECK:STDOUT: %.loc14 = load i32, ptr %value.var, align 4, !dbg !81
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %value.var), !dbg !74
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %value.var), !dbg !74
|
||||
// CHECK:STDOUT: ret i32 %.loc14, !dbg !82
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -455,7 +455,7 @@ fn MyF() -> i32 {
|
||||
// CHECK:STDOUT: declare noundef i32 @_Z17SimpleReturnValueii(i32 noundef, i32 noundef) #2
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %self) #0 !dbg !83 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !83 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !85
|
||||
// CHECK:STDOUT: }
|
||||
@@ -505,7 +505,7 @@ fn MyF() -> i32 {
|
||||
// CHECK:STDOUT: !80 = !DILocation(line: 13, column: 11, scope: !68)
|
||||
// CHECK:STDOUT: !81 = !DILocation(line: 14, column: 10, scope: !68)
|
||||
// CHECK:STDOUT: !82 = !DILocation(line: 14, column: 3, scope: !68)
|
||||
// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !86)
|
||||
// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !55, line: 11, type: !61, spFlags: DISPFlagDefinition, unit: !56, retainedNodes: !86)
|
||||
// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !57)
|
||||
// CHECK:STDOUT: !85 = !DILocation(line: 11, column: 3, scope: !83)
|
||||
// CHECK:STDOUT: !86 = !{!84}
|
||||
|
||||
@@ -320,7 +320,7 @@ fn F() {
|
||||
// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
|
||||
// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @float.9ba = internal constant float 1.000000e+00
|
||||
// CHECK:STDOUT: @float.239 = internal constant float 1.000000e+00
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !62 {
|
||||
@@ -330,10 +330,10 @@ fn F() {
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %x.var), !dbg !63
|
||||
// CHECK:STDOUT: %GetCallback.call = call ptr @_Z11GetCallbackv(), !dbg !64
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc6_41.3.temp), !dbg !65
|
||||
// CHECK:STDOUT: %__invoke__carbon_thunk.call = call i32 @.carbon_thunk.__(ptr %GetCallback.call, ptr @float.9ba), !dbg !64
|
||||
// CHECK:STDOUT: %__invoke__carbon_thunk.call = call i32 @.carbon_thunk.__(ptr %GetCallback.call, ptr @float.239), !dbg !64
|
||||
// CHECK:STDOUT: store i32 %__invoke__carbon_thunk.call, ptr %x.var, align 4, !dbg !63
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.789c68e35d514fac:core.Destroy.Core"(ptr @float.9ba), !dbg !65
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %x.var), !dbg !63
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.3bc6e22e744a96e5:core.Destroy.Core"(ptr @float.239), !dbg !65
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %x.var), !dbg !63
|
||||
// CHECK:STDOUT: ret void, !dbg !67
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -354,13 +354,13 @@ fn F() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.789c68e35d514fac:core.Destroy.Core"(ptr %self) #0 !dbg !68 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.3bc6e22e744a96e5:core.Destroy.Core"(ptr %self) #0 !dbg !68 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !70
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %self) #0 !dbg !72 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !72 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !74
|
||||
// CHECK:STDOUT: }
|
||||
@@ -405,11 +405,11 @@ fn F() {
|
||||
// CHECK:STDOUT: !64 = !DILocation(line: 6, column: 23, scope: !62)
|
||||
// CHECK:STDOUT: !65 = !DILocation(line: 6, column: 41, scope: !62)
|
||||
// CHECK:STDOUT: !67 = !DILocation(line: 5, column: 1, scope: !62)
|
||||
// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.789c68e35d514fac:core.Destroy.Core", scope: null, file: !56, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !57, retainedNodes: !71)
|
||||
// CHECK:STDOUT: !68 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.3bc6e22e744a96e5:core.Destroy.Core", scope: null, file: !56, line: 6, type: !12, spFlags: DISPFlagDefinition, unit: !57, retainedNodes: !71)
|
||||
// CHECK:STDOUT: !69 = !DILocalVariable(arg: 1, scope: !68, type: !8)
|
||||
// CHECK:STDOUT: !70 = !DILocation(line: 6, column: 41, scope: !68)
|
||||
// CHECK:STDOUT: !71 = !{!69}
|
||||
// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core", scope: null, file: !56, line: 6, type: !61, spFlags: DISPFlagDefinition, unit: !57, retainedNodes: !75)
|
||||
// CHECK:STDOUT: !72 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !56, line: 6, type: !61, spFlags: DISPFlagDefinition, unit: !57, retainedNodes: !75)
|
||||
// CHECK:STDOUT: !73 = !DILocalVariable(arg: 1, scope: !72, type: !27)
|
||||
// CHECK:STDOUT: !74 = !DILocation(line: 6, column: 3, scope: !72)
|
||||
// CHECK:STDOUT: !75 = !{!73}
|
||||
|
||||
@@ -48,12 +48,12 @@ fn Call() -> i32 {
|
||||
// CHECK:STDOUT: store i32 0, ptr %n.var, align 4, !dbg !38
|
||||
// CHECK:STDOUT: call void @_Z1FPi(ptr %n.var), !dbg !42
|
||||
// CHECK:STDOUT: %.loc24 = load i32, ptr %n.var, align 4, !dbg !43
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %n.var), !dbg !38
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %n.var), !dbg !38
|
||||
// CHECK:STDOUT: ret i32 %.loc24, !dbg !44
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %self) #1 !dbg !45 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #1 !dbg !45 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !47
|
||||
// CHECK:STDOUT: }
|
||||
@@ -90,7 +90,7 @@ fn Call() -> i32 {
|
||||
// CHECK:STDOUT: !42 = !DILocation(line: 23, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !43 = !DILocation(line: 24, column: 10, scope: !35)
|
||||
// CHECK:STDOUT: !44 = !DILocation(line: 24, column: 3, scope: !35)
|
||||
// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !48)
|
||||
// CHECK:STDOUT: !45 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !25, line: 22, type: !34, spFlags: DISPFlagDefinition, unit: !26, retainedNodes: !48)
|
||||
// CHECK:STDOUT: !46 = !DILocalVariable(arg: 1, scope: !45, type: !27)
|
||||
// CHECK:STDOUT: !47 = !DILocation(line: 22, column: 3, scope: !45)
|
||||
// CHECK:STDOUT: !48 = !{!46}
|
||||
|
||||
@@ -114,10 +114,10 @@ fn PassValueExpr(y: Cpp.Y) {
|
||||
// CHECK:STDOUT: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
|
||||
// CHECK:STDOUT: target triple = "x86_64-unknown-linux-gnu"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @int_1.0be = internal constant i8 1
|
||||
// CHECK:STDOUT: @int_2.396 = internal constant i16 2
|
||||
// CHECK:STDOUT: @int_1.847 = internal constant i8 1
|
||||
// CHECK:STDOUT: @int_2.3f1 = internal constant i16 2
|
||||
// CHECK:STDOUT: @int_1.2eb = internal constant i8 1
|
||||
// CHECK:STDOUT: @int_2.fee = internal constant i16 2
|
||||
// CHECK:STDOUT: @int_1.5dc = internal constant i8 1
|
||||
// CHECK:STDOUT: @int_2.2d4 = internal constant i16 2
|
||||
// CHECK:STDOUT: @_Cc.Main = global i16 0
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
@@ -130,14 +130,14 @@ fn PassValueExpr(y: Cpp.Y) {
|
||||
// CHECK:STDOUT: %.loc9_24.3.temp = alloca i16, align 2, !dbg !68
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.3.temp), !dbg !64
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_22.3.temp), !dbg !65
|
||||
// CHECK:STDOUT: call void @_Z11pass_signedasil.carbon_thunk.____(ptr @int_1.0be, ptr @int_2.396, i32 3, i64 4), !dbg !66
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr @int_2.396), !dbg !65
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.ce9d87a5bcefd6fb:core.Destroy.Core"(ptr @int_1.0be), !dbg !64
|
||||
// CHECK:STDOUT: call void @_Z11pass_signedasil.carbon_thunk.____(ptr @int_1.2eb, ptr @int_2.fee, i32 3, i64 4), !dbg !66
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr @int_2.fee), !dbg !65
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr @int_1.2eb), !dbg !64
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_21.3.temp), !dbg !67
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc9_24.3.temp), !dbg !68
|
||||
// CHECK:STDOUT: call void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr @int_1.847, ptr @int_2.3f1, i32 3, i64 4), !dbg !69
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d137a762b4b1bf48:core.Destroy.Core"(ptr @int_2.3f1), !dbg !68
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0882e9744a179a0d:core.Destroy.Core"(ptr @int_1.847), !dbg !67
|
||||
// CHECK:STDOUT: call void @_Z13pass_unsignedhtjm.carbon_thunk.____(ptr @int_1.5dc, ptr @int_2.2d4, i32 3, i64 4), !dbg !69
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr @int_2.2d4), !dbg !68
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr @int_1.5dc), !dbg !67
|
||||
// CHECK:STDOUT: ret void, !dbg !70
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -163,13 +163,13 @@ fn PassValueExpr(y: Cpp.Y) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %self) #0 !dbg !71 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %self) #0 !dbg !71 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !73
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ce9d87a5bcefd6fb:core.Destroy.Core"(ptr %self) #0 !dbg !75 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr %self) #0 !dbg !75 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !77
|
||||
// CHECK:STDOUT: }
|
||||
@@ -196,13 +196,13 @@ fn PassValueExpr(y: Cpp.Y) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d137a762b4b1bf48:core.Destroy.Core"(ptr %self) #0 !dbg !79 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr %self) #0 !dbg !79 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !81
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0882e9744a179a0d:core.Destroy.Core"(ptr %self) #0 !dbg !83 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %self) #0 !dbg !83 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !85
|
||||
// CHECK:STDOUT: }
|
||||
@@ -219,22 +219,22 @@ fn PassValueExpr(y: Cpp.Y) {
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc17_18.1.temp), !dbg !92
|
||||
// CHECK:STDOUT: store i16 %a, ptr %.loc17_18.1.temp, align 2, !dbg !92
|
||||
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc17_18.1.temp), !dbg !93
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !92
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc17_18.1.temp), !dbg !92
|
||||
// CHECK:STDOUT: %.loc18_18.2 = load i16, ptr %b, align 2, !dbg !95
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc18_18.3.temp), !dbg !95
|
||||
// CHECK:STDOUT: store i16 %.loc18_18.2, ptr %.loc18_18.3.temp, align 2, !dbg !95
|
||||
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc18_18.3.temp), !dbg !96
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !95
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc18_18.3.temp), !dbg !95
|
||||
// CHECK:STDOUT: %.loc19_18.1 = load i16, ptr @_Cc.Main, align 2, !dbg !97
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc19_18.2.temp), !dbg !97
|
||||
// CHECK:STDOUT: store i16 %.loc19_18.1, ptr %.loc19_18.2.temp, align 2, !dbg !97
|
||||
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc19_18.2.temp), !dbg !98
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !97
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc19_18.2.temp), !dbg !97
|
||||
// CHECK:STDOUT: %MakeShort.call = call i16 @_CMakeShort.Main(), !dbg !99
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc20_28.3.temp), !dbg !99
|
||||
// CHECK:STDOUT: store i16 %MakeShort.call, ptr %.loc20_28.3.temp, align 2, !dbg !99
|
||||
// CHECK:STDOUT: call void @_Z10pass_shorts.carbon_thunk._(ptr %.loc20_28.3.temp), !dbg !100
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !99
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc20_28.3.temp), !dbg !99
|
||||
// CHECK:STDOUT: ret void, !dbg !101
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -307,19 +307,19 @@ fn PassValueExpr(y: Cpp.Y) {
|
||||
// CHECK:STDOUT: !68 = !DILocation(line: 9, column: 24, scope: !63)
|
||||
// CHECK:STDOUT: !69 = !DILocation(line: 9, column: 3, scope: !63)
|
||||
// CHECK:STDOUT: !70 = !DILocation(line: 6, column: 1, scope: !63)
|
||||
// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core", scope: null, file: !34, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74)
|
||||
// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core", scope: null, file: !34, line: 7, type: !48, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !74)
|
||||
// CHECK:STDOUT: !72 = !DILocalVariable(arg: 1, scope: !71, type: !39)
|
||||
// CHECK:STDOUT: !73 = !DILocation(line: 7, column: 22, scope: !71)
|
||||
// CHECK:STDOUT: !74 = !{!72}
|
||||
// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ce9d87a5bcefd6fb:core.Destroy.Core", scope: null, file: !34, line: 7, type: !50, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78)
|
||||
// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core", scope: null, file: !34, line: 7, type: !50, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !78)
|
||||
// CHECK:STDOUT: !76 = !DILocalVariable(arg: 1, scope: !75, type: !38)
|
||||
// CHECK:STDOUT: !77 = !DILocation(line: 7, column: 19, scope: !75)
|
||||
// CHECK:STDOUT: !78 = !{!76}
|
||||
// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d137a762b4b1bf48:core.Destroy.Core", scope: null, file: !34, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82)
|
||||
// CHECK:STDOUT: !79 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8a85cde440b80916:core.Destroy.Core", scope: null, file: !34, line: 9, type: !54, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !82)
|
||||
// CHECK:STDOUT: !80 = !DILocalVariable(arg: 1, scope: !79, type: !41)
|
||||
// CHECK:STDOUT: !81 = !DILocation(line: 9, column: 24, scope: !79)
|
||||
// CHECK:STDOUT: !82 = !{!80}
|
||||
// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0882e9744a179a0d:core.Destroy.Core", scope: null, file: !34, line: 9, type: !56, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !86)
|
||||
// CHECK:STDOUT: !83 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core", scope: null, file: !34, line: 9, type: !56, spFlags: DISPFlagDefinition, unit: !35, retainedNodes: !86)
|
||||
// CHECK:STDOUT: !84 = !DILocalVariable(arg: 1, scope: !83, type: !10)
|
||||
// CHECK:STDOUT: !85 = !DILocation(line: 9, column: 21, scope: !83)
|
||||
// CHECK:STDOUT: !86 = !{!84}
|
||||
|
||||
@@ -264,33 +264,33 @@ fn Call(x: Cpp.D) -> Cpp.C {
|
||||
// CHECK:STDOUT: %ReturnI32.call = call i32 @_Z9ReturnI32v(), !dbg !112
|
||||
// CHECK:STDOUT: %ReturnI64.call = call i64 @_Z9ReturnI64v(), !dbg !115
|
||||
// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc19_32.4, i16 %.loc20_35.4, i32 %ReturnU32.call, i64 %ReturnU64.call, i8 %.loc24_32.4, i16 %.loc25_35.4, i32 %ReturnI32.call, i64 %ReturnI64.call), !dbg !126
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %.loc25_35.1.temp), !dbg !109
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.ce9d87a5bcefd6fb:core.Destroy.Core"(ptr %.loc24_32.1.temp), !dbg !106
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d137a762b4b1bf48:core.Destroy.Core"(ptr %.loc20_35.1.temp), !dbg !97
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0882e9744a179a0d:core.Destroy.Core"(ptr %.loc19_32.1.temp), !dbg !94
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %.loc25_35.1.temp), !dbg !109
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr %.loc24_32.1.temp), !dbg !106
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr %.loc20_35.1.temp), !dbg !97
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %.loc19_32.1.temp), !dbg !94
|
||||
// CHECK:STDOUT: ret void, !dbg !127
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %self) #0 !dbg !128 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %self) #0 !dbg !128 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !130
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ce9d87a5bcefd6fb:core.Destroy.Core"(ptr %self) #0 !dbg !132 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr %self) #0 !dbg !132 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !134
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d137a762b4b1bf48:core.Destroy.Core"(ptr %self) #0 !dbg !136 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr %self) #0 !dbg !136 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !138
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.0882e9744a179a0d:core.Destroy.Core"(ptr %self) #0 !dbg !140 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %self) #0 !dbg !140 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !142
|
||||
// CHECK:STDOUT: }
|
||||
@@ -335,37 +335,37 @@ fn Call(x: Cpp.D) -> Cpp.C {
|
||||
// CHECK:STDOUT: %.loc43_53 = load i32, ptr %my_i32.var, align 4, !dbg !175
|
||||
// CHECK:STDOUT: %.loc43_61 = load i64, ptr %my_i64.var, align 8, !dbg !176
|
||||
// CHECK:STDOUT: call void @_CUse.Main(i8 %.loc43_7, i16 %.loc43_14, i32 %.loc43_22, i64 %.loc43_30, i8 %.loc43_38, i16 %.loc43_45, i32 %.loc43_53, i64 %.loc43_61), !dbg !177
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d8f25ee8ccee729d:core.Destroy.Core"(ptr %my_i64.var), !dbg !166
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %my_i32.var), !dbg !163
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core"(ptr %my_i16.var), !dbg !160
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.ce9d87a5bcefd6fb:core.Destroy.Core"(ptr %my_i8.var), !dbg !157
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.51e4280ece3a1f4b:core.Destroy.Core"(ptr %my_u64.var), !dbg !154
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.86e0edea7c7a9399:core.Destroy.Core"(ptr %my_u32.var), !dbg !151
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.d137a762b4b1bf48:core.Destroy.Core"(ptr %my_u16.var), !dbg !148
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.0882e9744a179a0d:core.Destroy.Core"(ptr %my_u8.var), !dbg !145
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.1528c87a0c8e3d39:core.Destroy.Core"(ptr %my_i64.var), !dbg !166
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %my_i32.var), !dbg !163
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core"(ptr %my_i16.var), !dbg !160
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core"(ptr %my_i8.var), !dbg !157
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.92d33a575b583425:core.Destroy.Core"(ptr %my_u64.var), !dbg !154
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.f9ba3945b52cc4dc:core.Destroy.Core"(ptr %my_u32.var), !dbg !151
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.8a85cde440b80916:core.Destroy.Core"(ptr %my_u16.var), !dbg !148
|
||||
// CHECK:STDOUT: call void @"_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core"(ptr %my_u8.var), !dbg !145
|
||||
// CHECK:STDOUT: ret void, !dbg !178
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d8f25ee8ccee729d:core.Destroy.Core"(ptr %self) #0 !dbg !179 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.1528c87a0c8e3d39:core.Destroy.Core"(ptr %self) #0 !dbg !179 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !181
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core"(ptr %self) #0 !dbg !183 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core"(ptr %self) #0 !dbg !183 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !185
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.51e4280ece3a1f4b:core.Destroy.Core"(ptr %self) #0 !dbg !187 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.92d33a575b583425:core.Destroy.Core"(ptr %self) #0 !dbg !187 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !189
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.86e0edea7c7a9399:core.Destroy.Core"(ptr %self) #0 !dbg !191 {
|
||||
// CHECK:STDOUT: define weak_odr void @"_CSelfDestruct.f9ba3945b52cc4dc:core.Destroy.Core"(ptr %self) #0 !dbg !191 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !193
|
||||
// CHECK:STDOUT: }
|
||||
@@ -474,19 +474,19 @@ fn Call(x: Cpp.D) -> Cpp.C {
|
||||
// CHECK:STDOUT: !115 = !DILocation(line: 27, column: 21, scope: !93)
|
||||
// CHECK:STDOUT: !126 = !DILocation(line: 29, column: 3, scope: !93)
|
||||
// CHECK:STDOUT: !127 = !DILocation(line: 18, column: 1, scope: !93)
|
||||
// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0aaddb4bdc513ad0:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131)
|
||||
// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.2282b3883c44dd3d:core.Destroy.Core", scope: null, file: !4, line: 25, type: !38, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !131)
|
||||
// CHECK:STDOUT: !129 = !DILocalVariable(arg: 1, scope: !128, type: !11)
|
||||
// CHECK:STDOUT: !130 = !DILocation(line: 25, column: 21, scope: !128)
|
||||
// CHECK:STDOUT: !131 = !{!129}
|
||||
// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ce9d87a5bcefd6fb:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135)
|
||||
// CHECK:STDOUT: !132 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.76b35ac5407de20a:core.Destroy.Core", scope: null, file: !4, line: 24, type: !40, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !135)
|
||||
// CHECK:STDOUT: !133 = !DILocalVariable(arg: 1, scope: !132, type: !10)
|
||||
// CHECK:STDOUT: !134 = !DILocation(line: 24, column: 19, scope: !132)
|
||||
// CHECK:STDOUT: !135 = !{!133}
|
||||
// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d137a762b4b1bf48:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139)
|
||||
// CHECK:STDOUT: !136 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.8a85cde440b80916:core.Destroy.Core", scope: null, file: !4, line: 20, type: !42, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !139)
|
||||
// CHECK:STDOUT: !137 = !DILocalVariable(arg: 1, scope: !136, type: !7)
|
||||
// CHECK:STDOUT: !138 = !DILocation(line: 20, column: 21, scope: !136)
|
||||
// CHECK:STDOUT: !139 = !{!137}
|
||||
// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.0882e9744a179a0d:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143)
|
||||
// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.ecefe2c1c010dc1e:core.Destroy.Core", scope: null, file: !4, line: 19, type: !44, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !143)
|
||||
// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !6)
|
||||
// CHECK:STDOUT: !142 = !DILocation(line: 19, column: 19, scope: !140)
|
||||
// CHECK:STDOUT: !143 = !{!141}
|
||||
@@ -517,19 +517,19 @@ fn Call(x: Cpp.D) -> Cpp.C {
|
||||
// CHECK:STDOUT: !176 = !DILocation(line: 43, column: 61, scope: !144)
|
||||
// CHECK:STDOUT: !177 = !DILocation(line: 43, column: 3, scope: !144)
|
||||
// CHECK:STDOUT: !178 = !DILocation(line: 32, column: 1, scope: !144)
|
||||
// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d8f25ee8ccee729d:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !182)
|
||||
// CHECK:STDOUT: !179 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.1528c87a0c8e3d39:core.Destroy.Core", scope: null, file: !4, line: 41, type: !46, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !182)
|
||||
// CHECK:STDOUT: !180 = !DILocalVariable(arg: 1, scope: !179, type: !13)
|
||||
// CHECK:STDOUT: !181 = !DILocation(line: 41, column: 3, scope: !179)
|
||||
// CHECK:STDOUT: !182 = !{!180}
|
||||
// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.d19d32d3b3a297a1:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !186)
|
||||
// CHECK:STDOUT: !183 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.72395be3dbbe8946:core.Destroy.Core", scope: null, file: !4, line: 40, type: !48, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !186)
|
||||
// CHECK:STDOUT: !184 = !DILocalVariable(arg: 1, scope: !183, type: !12)
|
||||
// CHECK:STDOUT: !185 = !DILocation(line: 40, column: 3, scope: !183)
|
||||
// CHECK:STDOUT: !186 = !{!184}
|
||||
// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.51e4280ece3a1f4b:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !190)
|
||||
// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.92d33a575b583425:core.Destroy.Core", scope: null, file: !4, line: 36, type: !50, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !190)
|
||||
// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !9)
|
||||
// CHECK:STDOUT: !189 = !DILocation(line: 36, column: 3, scope: !187)
|
||||
// CHECK:STDOUT: !190 = !{!188}
|
||||
// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.86e0edea7c7a9399:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !194)
|
||||
// CHECK:STDOUT: !191 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.f9ba3945b52cc4dc:core.Destroy.Core", scope: null, file: !4, line: 35, type: !52, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !194)
|
||||
// CHECK:STDOUT: !192 = !DILocalVariable(arg: 1, scope: !191, type: !8)
|
||||
// CHECK:STDOUT: !193 = !DILocation(line: 35, column: 3, scope: !191)
|
||||
// CHECK:STDOUT: !194 = !{!192}
|
||||
|
||||
Reference in new issue
Block a user