mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Move instruction names for struct and tuple values from lower to InstNamer. (#3918)
Change the names for emitted globals for constants with storage to include both the name of the constant and the name of the use. This causes the instructions to also be named in SemIR and in LLVM IR constants.
This commit is contained in:
@@ -13,7 +13,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: ; ModuleID = 'struct_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "struct_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @const.loc10_4.3 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT: @struct.3.loc10_4.3 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @F({ i32 } %b, ptr %c) {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -22,6 +22,6 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @Main() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @F({ i32 } { i32 1 }, ptr @const.loc10_4.3)
|
||||
// CHECK:STDOUT: call void @F({ i32 } { i32 1 }, ptr @struct.3.loc10_4.3)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -13,7 +13,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: ; ModuleID = 'tuple_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "tuple_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @const.loc10_4.3 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT: @tuple.3.loc10_4.3 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @F({ i32 } %b, ptr %c) {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -22,6 +22,6 @@ fn Main() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @Main() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @F({ i32 } { i32 1 }, ptr @const.loc10_4.3)
|
||||
// CHECK:STDOUT: call void @F({ i32 } { i32 1 }, ptr @tuple.3.loc10_4.3)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -15,7 +15,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: ; ModuleID = 'tuple_param_with_return_slot.carbon'
|
||||
// CHECK:STDOUT: source_filename = "tuple_param_with_return_slot.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @const.loc12_4.4 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT: @tuple.3.loc12_4.4 = internal constant { i32, i32 } { i32 2, i32 3 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define void @F(ptr sret({ i32, i32, i32 }) %return, { i32 } %b, ptr %c) {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -36,7 +36,7 @@ fn Main() {
|
||||
// CHECK:STDOUT: define void @Main() {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc12_4.1.temp = alloca { i32, i32, i32 }, align 8
|
||||
// CHECK:STDOUT: call void @F(ptr %.loc12_4.1.temp, { i32 } { i32 1 }, ptr @const.loc12_4.4)
|
||||
// CHECK:STDOUT: call void @F(ptr %.loc12_4.1.temp, { i32 } { i32 1 }, ptr @tuple.3.loc12_4.4)
|
||||
// CHECK:STDOUT: ret void
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
Reference in New Issue
Block a user