Skip to content

Commit 7955ba9

Browse files
committed
Revert "Merge pull request #74839 from drexin/wip-130783369"
This reverts commit 4edda08, reversing changes made to ac5763b.
1 parent 9b10362 commit 7955ba9

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,8 +2849,7 @@ class SyncCallEmission final : public CallEmission {
28492849
errorExplosion.add(elt);
28502850
}
28512851
} else {
2852-
errorExplosion.add(convertIfNecessary(
2853-
combined.combinedTy, values[combined.errorValueMapping[0]]));
2852+
errorExplosion.add(convertIfNecessary(combined.combinedTy, values[0]));
28542853
}
28552854

28562855
typedErrorExplosion =

test/IRGen/typed_throws.swift

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -92,26 +92,3 @@ func testit() throws (S) {
9292
public struct TypeH {
9393
public var method: (Int) throws(MyBigError) -> String
9494
}
95-
96-
struct SmallError: Error {
97-
let x: Int
98-
}
99-
100-
@inline(never)
101-
func throwsSmallError() throws(SmallError) -> (Float, Int) {
102-
throw SmallError(x: 1)
103-
}
104-
105-
// CHECK: define hidden swiftcc i64 @"$s12typed_throws17catchesSmallErrorSiyF"()
106-
// CHECK: [[RES:%.*]] = call swiftcc { float, i64 } @"$s12typed_throws0B10SmallErrorSf_SityAA0cD0VYKF"(ptr swiftself undef, ptr noalias nocapture swifterror dereferenceable(8) %swifterror)
107-
// CHECK: [[R0:%.*]] = extractvalue { float, i64 } [[RES]], 0
108-
// CHECK: [[R1:%.*]] = extractvalue { float, i64 } [[RES]], 1
109-
// CHECK: phi i64 [ [[R1]], %typed.error.load ]
110-
// CHECK: }
111-
func catchesSmallError() -> Int {
112-
do {
113-
return try throwsSmallError().1
114-
} catch {
115-
return error.x
116-
}
117-
}

0 commit comments

Comments
 (0)