Handle Temporary values when const-evaling AcquireValue (#6992)

This will be used for const-evaling functions. Splitting into a separate
commit since it touches a lot of test files, and a couple fail_todo
tests are no longer failing.
This commit is contained in:
Nicholas Bishop
2026-03-31 15:50:54 +00:00
committed by GitHub
parent bf6a14ac39
commit 396756c151
48 changed files with 304 additions and 241 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ fn G() -> i32 {
// CHECK:STDOUT: source_filename = "function_param.carbon"
// CHECK:STDOUT:
// CHECK:STDOUT: @array = internal constant [3 x i32] [i32 1, i32 2, i32 3]
// CHECK:STDOUT: @array.loc18_20.15 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
// CHECK:STDOUT:
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define i32 @_CF.Main(ptr %arr, i32 %i) #0 !dbg !4 {
@@ -39,7 +40,7 @@ fn G() -> i32 {
// CHECK:STDOUT: %.loc18_20.4.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 0, !dbg !17
// CHECK:STDOUT: %.loc18_20.7.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 1, !dbg !17
// CHECK:STDOUT: %.loc18_20.10.array.index = getelementptr inbounds [3 x i32], ptr %.loc18_20.3.temp, i32 0, i64 2, !dbg !17
// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr @array, i32 1), !dbg !18
// CHECK:STDOUT: %F.call = call i32 @_CF.Main(ptr @array.loc18_20.15, i32 1), !dbg !18
// CHECK:STDOUT: ret i32 %F.call, !dbg !19
// CHECK:STDOUT: }
// CHECK:STDOUT: