Skip to content

Commit 80911b5

Browse files
Merge pull request #11888 from adrian-prantl/dwarfdump
Adapt testcases to upstream changes in llvm-dwarfdump.
2 parents 01605bd + 8e309c0 commit 80911b5

File tree

7 files changed

+29
-27
lines changed

7 files changed

+29
-27
lines changed

test/DebugInfo/Imports.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - | %FileCheck %s
55
// RUN: %target-swift-frontend -c -module-name Foo %s -I %t -g -o %t.o
6-
// RUN: %llvm-dwarfdump %t.o | %FileCheck --check-prefix=DWARF %s
6+
// RUN: %llvm-dwarfdump -a %t.o | %FileCheck --check-prefix=DWARF %s
77

88
// CHECK-DAG: ![[FOOMODULE:[0-9]+]] = !DIModule({{.*}}, name: "Foo", includePath: "{{.*}}test{{.*}}DebugInfo{{.*}}"
99
// CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE:[0-9]+]], entity: ![[FOOMODULE]]
@@ -21,13 +21,13 @@ markUsed(basic.foo(1, 2))
2121

2222
// DWARF: .debug_info
2323
// DWARF: DW_TAG_module
24-
// DWARF: DW_AT_name {{.*}}"Foo"
24+
// DWARF: DW_AT_name ("Foo")
2525
// DWARF: DW_AT_LLVM_include_path
2626
// DWARF: DW_TAG_module
27-
// DWARF: DW_AT_name {{.*}}"Swift"
27+
// DWARF: DW_AT_name ("Swift")
2828
// DWARF: DW_AT_LLVM_include_path
2929
// DWARF: DW_TAG_module
30-
// DWARF: DW_AT_name {{.*}}"basic"
30+
// DWARF: DW_AT_name ("basic")
3131

3232
// DWARF-NOT: "Swift.Optional"
3333

test/DebugInfo/apple-types-accel.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
22
// RUN: %target-swift-frontend %s -c -g -o %t.o
3-
// RUN: dwarfdump --apple-types %t.o | %FileCheck --check-prefix=CHECK-ACCEL %s
4-
// RUN: dwarfdump --debug-info %t.o | %FileCheck --check-prefix=CHECK-DWARF %s
3+
// RUN: %llvm-dwarfdump --apple-types %t.o \
4+
// RUN: | %FileCheck --check-prefix=CHECK-ACCEL %s
5+
// RUN: %llvm-dwarfdump --debug-info %t.o \
6+
// RUN: | %FileCheck --check-prefix=CHECK-DWARF %s
57
// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o
68
// REQUIRES: OS=macosx
79

810
// Verify that the unmangles basenames end up in the accelerator table.
9-
// CHECK-ACCEL-DAG: str[0]{{.*}}"Int64"
10-
// CHECK-ACCEL-DAG: str[0]{{.*}}"foo"
11+
// CHECK-ACCEL-DAG: Name: {{.*}}"Int64"
12+
// CHECK-ACCEL-DAG: Name: {{.*}}"foo"
1113

1214
// Verify that the mangled names end up in the debug info.
1315
// CHECK-DWARF: TAG_module
14-
// CHECK-DWARF-NEXT: AT_name( "main" )
16+
// CHECK-DWARF-NEXT: AT_name ("main")
1517
// CHECK-DWARF: TAG_structure_type
16-
// CHECK-DWARF-NEXT: AT_name( "foo" )
17-
// CHECK-DWARF-NEXT: AT_linkage_name( "_T04main3fooCD" )
18+
// CHECK-DWARF-NEXT: AT_name ("foo")
19+
// CHECK-DWARF-NEXT: AT_linkage_name ("_T04main3fooCD")
1820

1921
// Verify the IR interface:
2022
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"

test/DebugInfo/iteration.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ count()
3131
// End-to-end test:
3232
// RUN: llc %t.ll -filetype=obj -o - | %llvm-dwarfdump - | %FileCheck %s --check-prefix DWARF-CHECK
3333
// DWARF-CHECK: DW_TAG_variable
34-
// DWARF-CHECK: DW_AT_name {{.*}} "letter"
34+
// DWARF-CHECK: DW_AT_name ("letter")
3535
//
3636
// DWARF-CHECK: DW_TAG_variable
37-
// DWARF-CHECK: DW_AT_name {{.*}} "i"
37+
// DWARF-CHECK: DW_AT_name ("i")

test/DebugInfo/letstring.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class AppDelegate {
2727
// End-to-end test:
2828
// RUN: llc %t.ll -filetype=obj -o %t.o
2929
// RUN: %llvm-dwarfdump %t.o | %FileCheck %s --check-prefix DWARF-CHECK
30-
// DWARF-CHECK: DW_AT_name {{.*}} "f"
30+
// DWARF-CHECK: DW_AT_name ("f")
3131
//
3232
// DWARF-CHECK: DW_TAG_formal_parameter
33-
// DWARF-CHECK: DW_AT_name {{.*}} "self"
33+
// DWARF-CHECK: DW_AT_name ("self")
3434
//
3535
// DWARF-CHECK: DW_TAG_variable
36-
// DWARF-CHECK: DW_AT_name {{.*}} "a"
36+
// DWARF-CHECK: DW_AT_name ("a")
3737
//
3838
// DWARF-CHECK: DW_TAG_variable
39-
// DWARF-CHECK: DW_AT_name {{.*}} "b"
39+
// DWARF-CHECK: DW_AT_name ("b")

test/DebugInfo/local-vars.swift.gyb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: %gyb %s -o %t.swift
66
// RUN: %target-swift-frontend %t.swift -g -emit-ir -o - | %FileCheck %t.swift
77
// RUN: %target-swift-frontend %t.swift -g -c -o %t.o
8-
// RUN: %llvm-dwarfdump --debug-dump=info %t.o \
8+
// RUN: %llvm-dwarfdump %t.o \
99
// RUN: | %FileCheck %t.swift --check-prefix=DWARF
1010
// RUN: %target-swift-frontend %t.swift -O -g -emit-ir -o - \
1111
// RUN: | %FileCheck %t.swift --check-prefix=OPTZNS
@@ -47,7 +47,7 @@ public func constant_${name}() -> ${type} {
4747
// DWARF-NOT: DW_TAG
4848
// DWARF: {{(DW_AT_location)|(DW_AT_const_value)}}
4949
// DWARF-NOT: DW_TAG
50-
// DWARF: DW_AT_name {{.*}}"v"
50+
// DWARF: DW_AT_name ("v")
5151
return v
5252
}
5353

@@ -61,7 +61,7 @@ public func constvar_${name}() {
6161
// DWARF-NOT: DW_TAG
6262
// DWARF: {{(DW_AT_location)|(DW_AT_const_value)}}
6363
// DWARF-NOT: DW_TAG
64-
// DWARF: DW_AT_name {{.*}}"v"
64+
// DWARF: DW_AT_name ("v")
6565
variable_use(&v)
6666
}
6767

@@ -75,7 +75,7 @@ public func let_${name}() {
7575
// DWARF-NOT: DW_TAG
7676
// DWARF: {{(DW_AT_location)|(DW_AT_const_value)}}
7777
// DWARF-NOT: DW_TAG
78-
// DWARF: DW_AT_name {{.*}}"v"
78+
// DWARF: DW_AT_name ("v")
7979
use(v)
8080
}
8181

test/DebugInfo/test-foundation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %FileCheck %s --check-prefix LOC-CHECK < %t.ll
44
// RUN: llc %t.ll -filetype=obj -o %t.o
55
// RUN: %llvm-dwarfdump %t.o | %FileCheck %s --check-prefix DWARF-CHECK
6-
// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o
6+
// DISABLED <rdar://problem/28232630>: %llvm-dwarfdump --verify %t.o
77

88
// REQUIRES: OS=macosx
99

@@ -43,7 +43,7 @@ MyObj = NsObj as! MyObject
4343
MyObj.blah()
4444

4545
public func err() {
46-
// DWARF-CHECK: DW_AT_name{{.*}}NSError
46+
// DWARF-CHECK: DW_AT_name ("NSError")
4747
// DWARF-CHECK: DW_AT_linkage_name{{.*}}_T0So7NSErrorC
4848
let _ = NSError(domain: "myDomain", code: 4,
4949
userInfo: [AnyHashable("a"):1,

test/DebugInfo/typearg.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Foo<Bar> {
3636
// Verify that the backend doesn't elide the debug intrinsics.
3737
// RUN: %target-swift-frontend %s -c -g -o %t.o
3838
// RUN: %llvm-dwarfdump %t.o | %FileCheck %s --check-prefix=CHECK-LLVM
39-
// CHECK-LLVM-DAG: .debug_str[{{.*}}] = "x"
40-
// CHECK-LLVM-DAG: .debug_str[{{.*}}] = "$swift.type.T"
41-
// CHECK- FIXME -LLVM-DAG: .debug_str[{{.*}}] = "$swift.type.Bar"
42-
// CHECK-LLVM-DAG: .debug_str[{{.*}}] = "$swift.type.Baz"
39+
// CHECK-LLVM-DAG: DW_AT_name ("x")
40+
// CHECK-LLVM-DAG: DW_AT_name ("$swift.type.T")
41+
// CHECK- FIXME -LLVM-DAG: DW_AT_name ("$swift.type.Bar")
42+
// CHECK-LLVM-DAG: DW_AT_name ("$swift.type.Baz")

0 commit comments

Comments
 (0)