Skip to content

Commit a0e1588

Browse files
committed
[cxx-interop] Fix reverse interop test for virtual method dispatch on arm64e
rdar://105396625
1 parent 7c16527 commit a0e1588

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-frontend %S/swift-class-virtual-method-dispatch.swift -target arm64e-apple-ios12.0 -typecheck -module-name Class -clang-header-expose-decls=all-public -emit-clang-header-path %t/class.h
2+
// RUN: %target-swift-frontend %S/swift-class-virtual-method-dispatch.swift -typecheck -module-name Class -clang-header-expose-decls=all-public -emit-clang-header-path %t/class.h
33
// RUN: %FileCheck %s < %t/class.h
44

55
// RUN: %check-interop-cxx-header-in-clang(%t/class.h)
66

77
// REQUIRES: CPU=arm64e
8-
// REQUIRES: OS=ios
9-
10-
// REQUIRES: rdar105396625
118

129
// note: uses swift-class-virtual-method-dispatch.swift
1310

@@ -21,6 +18,6 @@
2118
// CHECK-NEXT: struct FTypeAddress {
2219
// CHECK-NEXT: decltype(_impl::$s5Class04BaseA0C13virtualMethodyyF) * __ptrauth_swift_class_method_pointer([[#AUTH:]]) func;
2320
// CHECK-NEXT: };
24-
// CHECK-NEXT: FTypeAddress *fptrptr_ = reinterpret_cast<FTypeAddress *>(vtable_ + [[#VM1:]]);
25-
// CHECK-NEXT: return (* fptrptr_->func)(::swift::_impl::_impl_RefCountedClass::getOpaquePointer(*this));
21+
// CHECK-NEXT: FTypeAddress *fptrptr_ = reinterpret_cast<FTypeAddress *>(vtable_ + [[#VM1:]] / sizeof(void *));
22+
// CHECK-NEXT: (* fptrptr_->func)(::swift::_impl::_impl_RefCountedClass::getOpaquePointer(*this));
2623
// CHECK-NEXT: }

test/Interop/SwiftToCxx/class/swift-class-virtual-method-dispatch.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
// RUN: %check-interop-cxx-header-in-clang(%t/class.h)
66

7-
// rdar://105396625
87
// UNSUPPORTED: CPU=arm64e
98

109
public class BaseClass {

0 commit comments

Comments
 (0)