Skip to content

Commit 924916f

Browse files
committed
[move-function-dbginfo] Modify a test slightly to fix the arm64 bots and re-enable that test.
The pattern started to fail here since the variable "m" is not a variable that we moved so as a result we use heuristics to determine if it should become an entry value. Noting that we only pattern match "m" to ensure that we can easily check the variable "k" afterwards (the thing that was actually moved), I just loosened the pattern so that we validate that we found "m" but do not check "m"'s location. This guarantees that on all platforms this will pattern match appropriately. rdar://91467528
1 parent b5904df commit 924916f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/DebugInfo/move_function_dbginfo_async.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ public func varSimpleTest<T>(_ msg: inout T, _ msg2: T) async {
233233
// DWARF-NEXT: DW_AT_name ("k")
234234
//
235235
// DWARF: DW_TAG_variable
236-
// DWARF-NEXT: DW_AT_location (DW_OP_entry_value([[ASYNC_REG]]), DW_OP_deref, DW_OP_plus_uconst 0x10, DW_OP_plus_uconst 0x10)
236+
// We don't pattern match the actual entry value of "m" since we don't guarantee
237+
// it is an entry value since it isn't moved.
238+
// DWARF-NEXT: DW_AT_location
237239
// DWARF-NEXT: DW_AT_name ("m")
238240
//
239241
// DWARF: DW_AT_linkage_name ("$s3out16varSimpleTestVaryyYaFTY2_")
@@ -247,7 +249,9 @@ public func varSimpleTest<T>(_ msg: inout T, _ msg2: T) async {
247249
//
248250
// DWARF: DW_AT_linkage_name ("$s3out16varSimpleTestVaryyYaFTQ3_")
249251
// DWARF: DW_TAG_variable
250-
// DWARF-NEXT: DW_AT_location (DW_OP_entry_value([[ASYNC_REG]]), DW_OP_deref, DW_OP_plus_uconst 0x10, DW_OP_plus_uconst 0x10)
252+
// We don't pattern match the actual entry value of "m" since we don't guarantee
253+
// it is an entry value since it isn't moved.
254+
// DWARF-NEXT: DW_AT_location
251255
// DWARF-NEXT: DW_AT_name ("m")
252256
// K is dead here.
253257
// DWARF: DW_TAG_variable
@@ -256,7 +260,9 @@ public func varSimpleTest<T>(_ msg: inout T, _ msg2: T) async {
256260
// We reinitialize k in 4.
257261
// DWARF: DW_AT_linkage_name ("$s3out16varSimpleTestVaryyYaFTY4_")
258262
// DWARF: DW_TAG_variable
259-
// DWARF-NEXT: DW_AT_location (DW_OP_entry_value([[ASYNC_REG]]), DW_OP_plus_uconst 0x10, DW_OP_plus_uconst 0x10)
263+
// We don't pattern match the actual entry value of "m" since we don't guarantee
264+
// it is an entry value since it isn't moved.
265+
// DWARF-NEXT: DW_AT_location
260266
// DWARF-NEXT: DW_AT_name ("m")
261267
// DWARF: DW_TAG_variable
262268
// DWARF-NEXT: DW_AT_location (0x{{[0-9a-f]+}}:

0 commit comments

Comments
 (0)