Adapt testcases to upstream changes in llvm-dwarfdump.

This commit is contained in:
Adrian Prantl
2017-09-12 16:04:06 -07:00
parent 5626c72718
commit 8e309c0570
7 changed files with 29 additions and 27 deletions

View File

@@ -3,7 +3,7 @@
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - | %FileCheck %s
// RUN: %target-swift-frontend -c -module-name Foo %s -I %t -g -o %t.o
// RUN: %llvm-dwarfdump %t.o | %FileCheck --check-prefix=DWARF %s
// RUN: %llvm-dwarfdump -a %t.o | %FileCheck --check-prefix=DWARF %s
// CHECK-DAG: ![[FOOMODULE:[0-9]+]] = !DIModule({{.*}}, name: "Foo", includePath: "{{.*}}test{{.*}}DebugInfo{{.*}}"
// CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE:[0-9]+]], entity: ![[FOOMODULE]]
@@ -21,13 +21,13 @@ markUsed(basic.foo(1, 2))
// DWARF: .debug_info
// DWARF: DW_TAG_module
// DWARF: DW_AT_name {{.*}}"Foo"
// DWARF: DW_AT_name ("Foo")
// DWARF: DW_AT_LLVM_include_path
// DWARF: DW_TAG_module
// DWARF: DW_AT_name {{.*}}"Swift"
// DWARF: DW_AT_name ("Swift")
// DWARF: DW_AT_LLVM_include_path
// DWARF: DW_TAG_module
// DWARF: DW_AT_name {{.*}}"basic"
// DWARF: DW_AT_name ("basic")
// DWARF-NOT: "Swift.Optional"

View File

@@ -1,20 +1,22 @@
// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
// RUN: %target-swift-frontend %s -c -g -o %t.o
// RUN: dwarfdump --apple-types %t.o | %FileCheck --check-prefix=CHECK-ACCEL %s
// RUN: dwarfdump --debug-info %t.o | %FileCheck --check-prefix=CHECK-DWARF %s
// RUN: %llvm-dwarfdump --apple-types %t.o \
// RUN: | %FileCheck --check-prefix=CHECK-ACCEL %s
// RUN: %llvm-dwarfdump --debug-info %t.o \
// RUN: | %FileCheck --check-prefix=CHECK-DWARF %s
// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o
// REQUIRES: OS=macosx
// Verify that the unmangles basenames end up in the accelerator table.
// CHECK-ACCEL-DAG: str[0]{{.*}}"Int64"
// CHECK-ACCEL-DAG: str[0]{{.*}}"foo"
// CHECK-ACCEL-DAG: Name: {{.*}}"Int64"
// CHECK-ACCEL-DAG: Name: {{.*}}"foo"
// Verify that the mangled names end up in the debug info.
// CHECK-DWARF: TAG_module
// CHECK-DWARF-NEXT: AT_name( "main" )
// CHECK-DWARF-NEXT: AT_name ("main")
// CHECK-DWARF: TAG_structure_type
// CHECK-DWARF-NEXT: AT_name( "foo" )
// CHECK-DWARF-NEXT: AT_linkage_name( "_T04main3fooCD" )
// CHECK-DWARF-NEXT: AT_name ("foo")
// CHECK-DWARF-NEXT: AT_linkage_name ("_T04main3fooCD")
// Verify the IR interface:
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo"

View File

@@ -31,7 +31,7 @@ count()
// End-to-end test:
// RUN: llc %t.ll -filetype=obj -o - | %llvm-dwarfdump - | %FileCheck %s --check-prefix DWARF-CHECK
// DWARF-CHECK: DW_TAG_variable
// DWARF-CHECK: DW_AT_name {{.*}} "letter"
// DWARF-CHECK: DW_AT_name ("letter")
//
// DWARF-CHECK: DW_TAG_variable
// DWARF-CHECK: DW_AT_name {{.*}} "i"
// DWARF-CHECK: DW_AT_name ("i")

View File

@@ -27,13 +27,13 @@ class AppDelegate {
// End-to-end test:
// RUN: llc %t.ll -filetype=obj -o %t.o
// RUN: %llvm-dwarfdump %t.o | %FileCheck %s --check-prefix DWARF-CHECK
// DWARF-CHECK: DW_AT_name {{.*}} "f"
// DWARF-CHECK: DW_AT_name ("f")
//
// DWARF-CHECK: DW_TAG_formal_parameter
// DWARF-CHECK: DW_AT_name {{.*}} "self"
// DWARF-CHECK: DW_AT_name ("self")
//
// DWARF-CHECK: DW_TAG_variable
// DWARF-CHECK: DW_AT_name {{.*}} "a"
// DWARF-CHECK: DW_AT_name ("a")
//
// DWARF-CHECK: DW_TAG_variable
// DWARF-CHECK: DW_AT_name {{.*}} "b"
// DWARF-CHECK: DW_AT_name ("b")

View File

@@ -5,7 +5,7 @@
// RUN: %gyb %s -o %t.swift
// RUN: %target-swift-frontend %t.swift -g -emit-ir -o - | %FileCheck %t.swift
// RUN: %target-swift-frontend %t.swift -g -c -o %t.o
// RUN: %llvm-dwarfdump --debug-dump=info %t.o \
// RUN: %llvm-dwarfdump %t.o \
// RUN: | %FileCheck %t.swift --check-prefix=DWARF
// RUN: %target-swift-frontend %t.swift -O -g -emit-ir -o - \
// RUN: | %FileCheck %t.swift --check-prefix=OPTZNS
@@ -47,7 +47,7 @@ public func constant_${name}() -> ${type} {
// DWARF-NOT: DW_TAG
// DWARF: {{(DW_AT_location)|(DW_AT_const_value)}}
// DWARF-NOT: DW_TAG
// DWARF: DW_AT_name {{.*}}"v"
// DWARF: DW_AT_name ("v")
return v
}
@@ -61,7 +61,7 @@ public func constvar_${name}() {
// DWARF-NOT: DW_TAG
// DWARF: {{(DW_AT_location)|(DW_AT_const_value)}}
// DWARF-NOT: DW_TAG
// DWARF: DW_AT_name {{.*}}"v"
// DWARF: DW_AT_name ("v")
variable_use(&v)
}
@@ -75,7 +75,7 @@ public func let_${name}() {
// DWARF-NOT: DW_TAG
// DWARF: {{(DW_AT_location)|(DW_AT_const_value)}}
// DWARF-NOT: DW_TAG
// DWARF: DW_AT_name {{.*}}"v"
// DWARF: DW_AT_name ("v")
use(v)
}

View File

@@ -3,7 +3,7 @@
// RUN: %FileCheck %s --check-prefix LOC-CHECK < %t.ll
// RUN: llc %t.ll -filetype=obj -o %t.o
// RUN: %llvm-dwarfdump %t.o | %FileCheck %s --check-prefix DWARF-CHECK
// DISABLED <rdar://problem/28232630>: dwarfdump --verify %t.o
// DISABLED <rdar://problem/28232630>: %llvm-dwarfdump --verify %t.o
// REQUIRES: OS=macosx
@@ -43,7 +43,7 @@ MyObj = NsObj as! MyObject
MyObj.blah()
public func err() {
// DWARF-CHECK: DW_AT_name{{.*}}NSError
// DWARF-CHECK: DW_AT_name ("NSError")
// DWARF-CHECK: DW_AT_linkage_name{{.*}}_T0So7NSErrorC
let _ = NSError(domain: "myDomain", code: 4,
userInfo: [AnyHashable("a"):1,

View File

@@ -36,7 +36,7 @@ class Foo<Bar> {
// Verify that the backend doesn't elide the debug intrinsics.
// RUN: %target-swift-frontend %s -c -g -o %t.o
// RUN: %llvm-dwarfdump %t.o | %FileCheck %s --check-prefix=CHECK-LLVM
// CHECK-LLVM-DAG: .debug_str[{{.*}}] = "x"
// CHECK-LLVM-DAG: .debug_str[{{.*}}] = "$swift.type.T"
// CHECK- FIXME -LLVM-DAG: .debug_str[{{.*}}] = "$swift.type.Bar"
// CHECK-LLVM-DAG: .debug_str[{{.*}}] = "$swift.type.Baz"
// CHECK-LLVM-DAG: DW_AT_name ("x")
// CHECK-LLVM-DAG: DW_AT_name ("$swift.type.T")
// CHECK- FIXME -LLVM-DAG: DW_AT_name ("$swift.type.Bar")
// CHECK-LLVM-DAG: DW_AT_name ("$swift.type.Baz")