mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[IRGen] Fix copy/paste error.
The schemas for the coro frame de/alloc functions were incorrectly not being assigned and instead the non-frame de/alloc functions were being assigned twice. Fix that and add more tests. rdar://163330882
This commit is contained in:
@@ -1094,11 +1094,11 @@ static void setPointerAuthOptions(PointerAuthOptions &opts,
|
||||
codeKey, /*address*/ false, Discrimination::Constant,
|
||||
SpecialPointerAuthDiscriminators::CoroDeallocationFunction);
|
||||
|
||||
opts.CoroAllocationFunction = PointerAuthSchema(
|
||||
opts.CoroFrameAllocationFunction = PointerAuthSchema(
|
||||
codeKey, /*address*/ false, Discrimination::Constant,
|
||||
SpecialPointerAuthDiscriminators::CoroFrameAllocationFunction);
|
||||
|
||||
opts.CoroDeallocationFunction = PointerAuthSchema(
|
||||
opts.CoroFrameDeallocationFunction = PointerAuthSchema(
|
||||
codeKey, /*address*/ false, Discrimination::Constant,
|
||||
SpecialPointerAuthDiscriminators::CoroFrameDeallocationFunction);
|
||||
}
|
||||
|
||||
@@ -37,10 +37,30 @@
|
||||
// CHECK-arm64e-SAME: i64 40879 },
|
||||
// CHECK-arm64e-SAME: section "llvm.ptrauth",
|
||||
// CHECK-arm64e-SAME: align 8
|
||||
// CHECK-arm64e-LABEL: _swift_coro_malloc.ptrauth.1 = private constant {
|
||||
// CHECK-arm64e-SAME: ptr @_swift_coro_malloc,
|
||||
// CHECK-arm64e-SAME: i32 0,
|
||||
// CHECK-arm64e-SAME: i64 0,
|
||||
// CHECK-arm64e-SAME: i64 53841 }
|
||||
// CHECK-arm64e-SAME: section "llvm.ptrauth"
|
||||
// CHECK-arm64e-SAME: align 8
|
||||
// CHECK-arm64e-LABEL: _swift_coro_free.ptrauth.2 = private constant {
|
||||
// CHECK-arm64e-SAME: ptr @_swift_coro_free,
|
||||
// CHECK-arm64e-SAME: i32 0,
|
||||
// CHECK-arm64e-SAME: i64 0,
|
||||
// CHECK-arm64e-SAME: i64 23464 },
|
||||
// CHECK-arm64e-SAME: section "llvm.ptrauth",
|
||||
// CHECK-arm64e-SAME: align 8
|
||||
// CHECK-LABEL: _swift_coro_malloc_allocator = linkonce_odr hidden constant %swift.coro_allocator {
|
||||
// CHECK-SAME: i32 258,
|
||||
// CHECK-SAME: malloc
|
||||
// CHECK-SAME: free
|
||||
// CHECK-SAME: _swift_coro_malloc
|
||||
// CHECK-ar64e-SAME: .ptrauth
|
||||
// CHECK-SAME: _swift_coro_free
|
||||
// CHECK-ar64e-SAME: .ptrauth
|
||||
// CHECK-SAME: _swift_coro_malloc
|
||||
// CHECK-ar64e-SAME: .ptrauth.1
|
||||
// CHECK-SAME: _swift_coro_free
|
||||
// CHECK-ar64e-SAME: .ptrauth.2
|
||||
// CHECK-SAME: }
|
||||
// CHECK-arm64e-LABEL: _swift_coro_task_alloc.ptrauth = private constant {
|
||||
// CHECK-arm64e-SAME: ptr @_swift_coro_task_alloc,
|
||||
@@ -56,10 +76,30 @@
|
||||
// CHECK-arm64e-SAME: i64 40879 },
|
||||
// CHECK-arm64e-SAME: section "llvm.ptrauth",
|
||||
// CHECK-arm64e-SAME: align 8
|
||||
// CHECK-arm64e-LABEL: _swift_coro_task_alloc.ptrauth.3 = private constant {
|
||||
// CHECK-arm64e-SAME: ptr @_swift_coro_task_alloc,
|
||||
// CHECK-arm64e-SAME: i32 0,
|
||||
// CHECK-arm64e-SAME: i64 0,
|
||||
// CHECK-arm64e-SAME: i64 53841 }
|
||||
// CHECK-arm64e-SAME: section "llvm.ptrauth"
|
||||
// CHECK-arm64e-SAME: align 8
|
||||
// CHECK-arm64e-LABEL: @_swift_coro_task_dealloc.ptrauth.4 = private constant {
|
||||
// CHECK-arm64e-SAME: ptr @_swift_coro_task_dealloc,
|
||||
// CHECK-arm64e-SAME: i32 0,
|
||||
// CHECK-arm64e-SAME: i64 0,
|
||||
// CHECK-arm64e-SAME: i64 23464 },
|
||||
// CHECK-arm64e-SAME: section "llvm.ptrauth",
|
||||
// CHECK-arm64e-SAME: align 8
|
||||
// CHECK-LABEL: _swift_coro_async_allocator = linkonce_odr hidden constant %swift.coro_allocator {
|
||||
// CHECK-SAME: i32 1,
|
||||
// CHECK-SAME: _swift_coro_task_alloc
|
||||
// CHECK-ar64e-SAME: .ptrauth
|
||||
// CHECK-SAME: _swift_coro_task_dealloc
|
||||
// CHECK-ar64e-SAME: .ptrauth
|
||||
// CHECK-SAME: _swift_coro_task_alloc
|
||||
// CHECK-ar64e-SAME: .ptrauth.3
|
||||
// CHECK-SAME: _swift_coro_task_dealloc
|
||||
// CHECK-ar64e-SAME: .ptrauth.4
|
||||
// CHECK-SAME: }
|
||||
|
||||
// CHECK-LABEL: @_swift_coro_alloc(
|
||||
|
||||
Reference in New Issue
Block a user