Skip to content

Commit 2a755b8

Browse files
committed
Fix accidental deletion of part of test
Commit 53d10f4c651934d1ac76b59f2f0ce2f52059f956 accidentally deleted parts of move_function_dbginfo test. This just reintroduces the deleted lines
1 parent c8eba86 commit 2a755b8

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

test/DebugInfo/move_function_dbginfo.swift

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ public func copyableVarArgTest(_ k: inout Klass) {
250250
// DWARF-NEXT: DW_AT_decl_line (
251251
// DWARF-NEXT: DW_AT_type (
252252
//
253+
// DWARF: DW_TAG_variable
254+
// DWARF-NEXT: DW_AT_location (
255+
// DWARF-NEXT: DW_AT_name ("m")
256+
// DWARF-NEXT: DW_AT_decl_file (
257+
// DWARF-NEXT: DW_AT_decl_line (
258+
// DWARF-NEXT: DW_AT_type (
253259
public func addressOnlyValueTest<T : P>(_ x: T) {
254260
let k = x
255261
k.doSomething()
@@ -265,6 +271,33 @@ public func addressOnlyValueTest<T : P>(_ x: T) {
265271
// CHECK: ret void
266272
// CHECK-NEXT: }
267273
//
274+
// DWARF: DW_AT_linkage_name ("$s3out23addressOnlyValueArgTestyyxnAA1PRzlF")
275+
// DWARF-NEXT: DW_AT_name ("addressOnlyValueArgTest")
276+
// DWARF-NEXT: DW_AT_decl_file (
277+
// DWARF-NEXT: DW_AT_decl_line (
278+
// DWARF-NEXT: DW_AT_type (
279+
// DWARF-NEXT: DW_AT_external (
280+
//
281+
// DWARF: DW_TAG_formal_parameter
282+
// DWARF-NEXT: DW_AT_location (0x{{[a-z0-9]+}}:
283+
// DWARF-NEXT: [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
284+
// DWARF-NEXT: DW_AT_name ("k")
285+
// DWARF-NEXT: DW_AT_decl_file (
286+
// DWARF-NEXT: DW_AT_decl_line (
287+
// DWARF-NEXT: DW_AT_type (
288+
//
289+
// DWARF: DW_TAG_variable
290+
// DWARF-NEXT: DW_AT_location (
291+
// DWARF-NEXT: DW_AT_name ("$\317\204_0_0")
292+
// DWARF-NEXT: DW_AT_type (
293+
// DWARF-NEXT: DW_AT_artificial (true)
294+
//
295+
// DWARF: DW_TAG_variable
296+
// DWARF-NEXT: DW_AT_location (
297+
// DWARF-NEXT: DW_AT_name ("m")
298+
// DWARF-NEXT: DW_AT_decl_file (
299+
// DWARF-NEXT: DW_AT_decl_line (
300+
// DWARF-NEXT: DW_AT_type (
268301
public func addressOnlyValueArgTest<T : P>(_ k: __owned T) {
269302
k.doSomething()
270303
let m = consume k
@@ -279,6 +312,35 @@ public func addressOnlyValueArgTest<T : P>(_ k: __owned T) {
279312
// CHECK: ret void
280313
// CHECK-NEXT: }
281314
//
315+
// DWARF: DW_AT_linkage_name ("$s3out18addressOnlyVarTestyyxAA1PRzlF")
316+
// DWARF-NEXT: DW_AT_name ("addressOnlyVarTest")
317+
// DWARF-NEXT: DW_AT_decl_file (
318+
// DWARF-NEXT: DW_AT_decl_line (
319+
// DWARF-NEXT: DW_AT_type (
320+
// DWARF-NEXT: DW_AT_external (
321+
//
322+
// DWARF: DW_TAG_formal_parameter
323+
// DWARF-NEXT: DW_AT_location (
324+
// DWARF-NEXT: DW_AT_name ("x")
325+
// DWARF-NEXT: DW_AT_decl_file (
326+
// DWARF-NEXT: DW_AT_decl_line (
327+
// DWARF-NEXT: DW_AT_type (
328+
//
329+
// DWARF: DW_TAG_variable
330+
// DWARF-NEXT: DW_AT_location (
331+
// DWARF-NEXT: DW_AT_name ("$\317\204_0_0")
332+
// DWARF-NEXT: DW_AT_type (
333+
// DWARF-NEXT: DW_AT_artificial (true)
334+
//
335+
// DWARF: DW_TAG_variable
336+
// DWARF-NEXT: DW_AT_location (0x{{[a-z0-9]+}}:
337+
// DWARF-NEXT: [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
338+
// TODO: Missing def in dbg info here.
339+
// DWARF-NEXT: [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
340+
// DWARF-NEXT: DW_AT_name ("k")
341+
// DWARF-NEXT: DW_AT_decl_file (
342+
// DWARF-NEXT: DW_AT_decl_line (
343+
// DWARF-NEXT: DW_AT_type (
282344
public func addressOnlyVarTest<T : P>(_ x: T) {
283345
var k = x // << this
284346
k.doSomething()
@@ -612,3 +674,4 @@ public func addressOnlyVarArgTestCCFlowReinitInBlockTest<T : P>(_ k: inout (any
612674
// CHECK-DAG: ![[K_ADDRESSONLY_VAR_CCFLOW_REINIT_OUT_BLOCK_METADATA]] = !DILocalVariable(name: "k",
613675
// CHECK-DAG: ![[K_ADDRESSONLY_VAR_CCFLOW_REINIT_IN_BLOCK_METADATA]] = !DILocalVariable(name: "k",
614676
// CHECK-DAG: ![[K_COPYABLE_LET_CCFLOW_METADATA]] = !DILocalVariable(name: "k",
677+

0 commit comments

Comments
 (0)