Update debuginfo tests for slightly shuffled i386 output

(cherry picked from commit 259480a7d0)
This commit is contained in:
Adrian Prantl
2021-09-04 17:16:01 -07:00
parent 428718a655
commit 8c4dcc7c7d
4 changed files with 6 additions and 9 deletions

View File

@@ -17,10 +17,8 @@ func simple(_ placeholder: Int64) throws -> () {
// CHECK-SAME: %swift.error** noalias nocapture dereferenceable(4)
// CHECK: call void @llvm.dbg.declare
// CHECK: call void @llvm.dbg.declare({{.*}}, metadata ![[ERROR:[0-9]+]], metadata !DIExpression(DW_OP_deref))
// CHECK: ![[ERRTY:.*]] = !DICompositeType({{.*}}identifier: "$ss5Error_pD"
// CHECK: ![[ERROR]] = !DILocalVariable(name: "$error", arg: 2,
// CHECK-SAME: type: ![[ERRTY]],
// CHECK-SAME: flags: DIFlagArtificial)
// CHECK-DAG: ![[ERRTY:.*]] = !DICompositeType({{.*}}identifier: "$ss5Error_pD"
// CHECK-DAG: ![[ERROR]] = !DILocalVariable(name: "$error", arg: 2, {{.*}}, type: ![[ERRTY]], flags: DIFlagArtificial)
throw MyError.Simple
}

View File

@@ -4,9 +4,8 @@ public enum E : Error { case Err }
// Function throws.
public func throwError() throws { throw E.Err }
// CHECK: !DISubprogram(name: "throwError", {{.*}}thrownTypes: ![[THROWN:.*]])
// CHECK: ![[THROWN]] = !{![[ERROR:[0-9]+]]}
// CHECK: ![[ERROR]] = !DICompositeType(tag: DW_TAG_structure_type,
// CHECK-SAME: name: "Error"
// CHECK-DAG: ![[THROWN]] = !{![[ERROR:[0-9]+]]}
// CHECK-DAG: ![[ERROR]] = !DICompositeType(tag: DW_TAG_structure_type, name: "Error"
// Function rethrows.

View File

@@ -11,7 +11,7 @@ public func getVegetables() async -> [String] {
public func chopVegetables() async throws -> [String] {
let veggies = await getVegetables()
// CHECK-NOT: {{^define }}
// CHECK: call void @llvm.dbg.declare(metadata i8* %0, metadata ![[V:[0-9]+]], metadata !DIExpression(
// CHECK: call void @llvm.dbg.declare(metadata i8* %0, metadata ![[V:[0-9]+]], metadata !DIExpression(DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_plus_uconst, {{[0-9]+}})
// CHECK: ![[V]] = !DILocalVariable(name: "veggies"
return veggies.map { "chopped \($0)" }
}

View File

@@ -16,7 +16,7 @@ public func makeDinner() async throws -> String {
// CHECK-LABEL: define {{.*}} void @"$s1a10makeDinnerSSyYaKFTQ0_"
// CHECK-NEXT: entryresume.0:
// CHECK-NOT: {{ ret }}
// CHECK: call void @llvm.dbg.declare(metadata {{.*}}%0, metadata ![[LOCAL:[0-9]+]], {{.*}}!DIExpression(DW_OP_deref, DW_OP_plus_uconst
// CHECK: call void @llvm.dbg.declare(metadata {{.*}}%0, metadata ![[LOCAL:[0-9]+]], {{.*}}!DIExpression(DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}})
// CHECK: ![[LOCAL]] = !DILocalVariable(name: "local"
return local
}