Skip to content

Commit 790c269

Browse files
committed
Revert "Merge pull request #75149 from drexin/wip-ptr-cast-tt"
This reverts commit 32af2f6, reversing changes made to d84a919.
1 parent 85c5648 commit 790c269

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4406,9 +4406,6 @@ void CallEmission::emitToUnmappedExplosionWithDirectTypedError(
44064406
auto *eltTy = elt->getType();
44074407
if (nativeTy->isIntOrPtrTy() && eltTy->isIntOrPtrTy() &&
44084408
nativeTy->getPrimitiveSizeInBits() != eltTy->getPrimitiveSizeInBits()) {
4409-
if (nativeTy->isPointerTy() && eltTy == IGF.IGM.IntPtrTy) {
4410-
return IGF.Builder.CreateIntToPtr(elt, nativeTy);
4411-
}
44124409
return IGF.Builder.CreateTruncOrBitCast(elt, nativeTy);
44134410
}
44144411
return elt;

test/IRGen/typed_throws.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,3 @@ func mayThrow(x: Bool, y: AnyObject) throws(MyError) -> (Float, Int32, Float) {
131131
}
132132
return (3.0, 4, 5.0)
133133
}
134-
135-
// CHECK: define hidden swiftcc { i64, i64 } @"$s12typed_throws25directErrorMergePtrAndInt1x1yyXl_SitSb_yXltAA05SmallD0VYKF"
136-
// CHECK: [[RES:%.*]] = call swiftcc { i64, i64 } @"$s12typed_throws25directErrorMergePtrAndInt1x1yyXl_SitSb_yXltAA05SmallD0VYKF"
137-
// CHECK: [[R0:%.*]] = extractvalue { i64, i64 } [[RES]], 0
138-
// CHECK: inttoptr i64 [[R0]] to ptr
139-
// CHECK: }
140-
func directErrorMergePtrAndInt(x: Bool, y: AnyObject) throws(SmallError) -> (AnyObject, Int) {
141-
guard x else {
142-
throw SmallError(x: 1)
143-
}
144-
145-
return try directErrorMergePtrAndInt(x: !x, y: y)
146-
}

0 commit comments

Comments
 (0)