mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Make FacetAccessType evaluate to SymbolicBindingType for type-of a BindSymbolicName (#6115)
The SymbolicBindingType refers to the type value that will be substituted in for the BindSymbolicName, but holds onto the EntityNameId from the BindSymbolicName instead of (or in addition to, for now) the instruction. The EntityNameId will be used to look in the ScopeStack to find the witnesses either from the BindSymbolicName instruction, or other instructions that specify `impls` constraints against the EntityName. This will allow us to have the `T` in `I(T)` resolve to a `.Self` reference in the type so that we get type equality with the binding's type: `T:! I(.Self)`.
This commit is contained in:
@@ -59,26 +59,26 @@ fn M() {
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_i32.var), !dbg !7
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %ptr_f64.var), !dbg !8
|
||||
// CHECK:STDOUT: %.loc46_5 = load ptr, ptr %ptr_i32.var, align 8, !dbg !9
|
||||
// CHECK:STDOUT: call void @_CF.Main.5458818be7a67202(ptr %.loc46_5), !dbg !10
|
||||
// CHECK:STDOUT: call void @_CF.Main.c831c62a6babb214(ptr %.loc46_5), !dbg !10
|
||||
// CHECK:STDOUT: %.loc47_5 = load ptr, ptr %ptr_f64.var, align 8, !dbg !11
|
||||
// CHECK:STDOUT: call void @_CF.Main.6d1061d836075fdf(ptr %.loc47_5), !dbg !12
|
||||
// CHECK:STDOUT: call void @_CF.Main.54ba0c5f7a576a29(ptr %.loc47_5), !dbg !12
|
||||
// CHECK:STDOUT: ret void, !dbg !13
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #0
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.5458818be7a67202(ptr %x) !dbg !14 {
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.c831c62a6babb214(ptr %x) !dbg !14 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %A.call = call %type @_CA.Main.402deed6b8733082(%type zeroinitializer), !dbg !15
|
||||
// CHECK:STDOUT: call void @_CB.Main.5458818be7a67202(ptr %x), !dbg !16
|
||||
// CHECK:STDOUT: call void @_CB.Main.c831c62a6babb214(ptr %x), !dbg !16
|
||||
// CHECK:STDOUT: ret void, !dbg !17
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.6d1061d836075fdf(ptr %x) !dbg !18 {
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CF.Main.54ba0c5f7a576a29(ptr %x) !dbg !18 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %A.call = call %type @_CA.Main.402deed6b8733082(%type zeroinitializer), !dbg !19
|
||||
// CHECK:STDOUT: call void @_CB.Main.6d1061d836075fdf(ptr %x), !dbg !20
|
||||
// CHECK:STDOUT: call void @_CB.Main.54ba0c5f7a576a29(ptr %x), !dbg !20
|
||||
// CHECK:STDOUT: ret void, !dbg !21
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -87,7 +87,7 @@ fn M() {
|
||||
// CHECK:STDOUT: ret %type %x, !dbg !23
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CB.Main.5458818be7a67202(ptr %x) !dbg !24 {
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CB.Main.c831c62a6babb214(ptr %x) !dbg !24 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc34_7.3.temp = alloca i32, align 4, !dbg !25
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !25
|
||||
@@ -97,7 +97,7 @@ fn M() {
|
||||
// CHECK:STDOUT: ret void, !dbg !27
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CB.Main.6d1061d836075fdf(ptr %x) !dbg !28 {
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CB.Main.54ba0c5f7a576a29(ptr %x) !dbg !28 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc34_7.3.temp = alloca double, align 8, !dbg !29
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc34_7.3.temp), !dbg !29
|
||||
@@ -140,21 +140,21 @@ fn M() {
|
||||
// CHECK:STDOUT: !11 = !DILocation(line: 47, column: 5, scope: !4)
|
||||
// CHECK:STDOUT: !12 = !DILocation(line: 47, column: 3, scope: !4)
|
||||
// CHECK:STDOUT: !13 = !DILocation(line: 42, column: 1, scope: !4)
|
||||
// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.5458818be7a67202", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !14 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.c831c62a6babb214", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !15 = !DILocation(line: 38, column: 3, scope: !14)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 39, column: 3, scope: !14)
|
||||
// CHECK:STDOUT: !17 = !DILocation(line: 37, column: 1, scope: !14)
|
||||
// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.6d1061d836075fdf", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !18 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main.54ba0c5f7a576a29", scope: null, file: !3, line: 37, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !19 = !DILocation(line: 38, column: 3, scope: !18)
|
||||
// CHECK:STDOUT: !20 = !DILocation(line: 39, column: 3, scope: !18)
|
||||
// CHECK:STDOUT: !21 = !DILocation(line: 37, column: 1, scope: !18)
|
||||
// CHECK:STDOUT: !22 = distinct !DISubprogram(name: "A", linkageName: "_CA.Main.402deed6b8733082", scope: null, file: !3, line: 25, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !23 = !DILocation(line: 26, column: 3, scope: !22)
|
||||
// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.5458818be7a67202", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !24 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.c831c62a6babb214", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !25 = !DILocation(line: 34, column: 3, scope: !24)
|
||||
// CHECK:STDOUT: !26 = !DILocation(line: 34, column: 5, scope: !24)
|
||||
// CHECK:STDOUT: !27 = !DILocation(line: 33, column: 1, scope: !24)
|
||||
// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.6d1061d836075fdf", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "B", linkageName: "_CB.Main.54ba0c5f7a576a29", scope: null, file: !3, line: 33, type: !5, spFlags: DISPFlagDefinition, unit: !2)
|
||||
// CHECK:STDOUT: !29 = !DILocation(line: 34, column: 3, scope: !28)
|
||||
// CHECK:STDOUT: !30 = !DILocation(line: 34, column: 5, scope: !28)
|
||||
// CHECK:STDOUT: !31 = !DILocation(line: 33, column: 1, scope: !28)
|
||||
|
||||
Reference in New Issue
Block a user