mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 16:21:04 +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:
+2
-2
@@ -15,7 +15,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: ; ModuleID = 'function_param.carbon'
|
||||
// CHECK:STDOUT: source_filename = "function_param.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @const.loc12_11.1 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
||||
// CHECK:STDOUT: @array.loc12_11.1 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: define i32 @F(ptr %arr, i32 %i) {
|
||||
// CHECK:STDOUT: entry:
|
||||
@@ -30,7 +30,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: %.loc12_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc12_20.2.temp, i32 0, i32 0
|
||||
// CHECK:STDOUT: %.loc12_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc12_20.2.temp, i32 0, i32 1
|
||||
// CHECK:STDOUT: %.loc12_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc12_20.2.temp, i32 0, i32 2
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc12_20.2.temp, ptr align 4 @const.loc12_11.1, i64 12, i1 false)
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %.loc12_20.2.temp, ptr align 4 @array.loc12_11.1, i64 12, i1 false)
|
||||
// CHECK:STDOUT: %F.call = call i32 @F(ptr %.loc12_20.2.temp, i32 1)
|
||||
// CHECK:STDOUT: ret i32 %F.call
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user