File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
test/Interop/SwiftToCxx/class Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ void ClangClassTypePrinter::printClassTypeDecl(
7070 os << " public:\n " ;
7171 os << " static inline " ;
7272 printer.printBaseName (typeDecl);
73- os << " fromUnretained (void * _Nonnull ptr) noexcept { return " ;
73+ os << " makeRetained (void * _Nonnull ptr) noexcept { return " ;
7474 printer.printBaseName (typeDecl);
7575 os << " (ptr); }\n " ;
7676 os << " };\n " ;
@@ -85,7 +85,7 @@ void ClangClassTypePrinter::printClassTypeReturnScaffold(
8585 type->getModuleContext (), moduleContext);
8686 os << cxx_synthesis::getCxxImplNamespaceName () << " ::" ;
8787 ClangValueTypePrinter::printCxxImplClassName (os, type);
88- os << " ::fromUnretained (" ;
88+ os << " ::makeRetained (" ;
8989 bodyPrinter ();
9090 os << " );\n " ;
9191}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public final class ClassWithIntField {
4343// CHECK-EMPTY:
4444// CHECK-NEXT:class _impl_ClassWithIntField {
4545// CHECK-NEXT:public:
46- // CHECK-NEXT:static inline ClassWithIntField fromUnretained (void * _Nonnull ptr) noexcept { return ClassWithIntField(ptr); }
46+ // CHECK-NEXT:static inline ClassWithIntField makeRetained (void * _Nonnull ptr) noexcept { return ClassWithIntField(ptr); }
4747// CHECK-NEXT:};
4848// CHECK-EMPTY:
4949// CHECK-NEXT:} // namespace _impl
@@ -57,5 +57,5 @@ public func returnClassWithIntField() -> ClassWithIntField {
5757}
5858
5959// CHECK: inline ClassWithIntField returnClassWithIntField() noexcept SWIFT_WARN_UNUSED_RESULT {
60- // CHECK-NEXT: return _impl::_impl_ClassWithIntField::fromUnretained (_impl::$s5Class06returnA12WithIntFieldAA0acdE0CyF());
60+ // CHECK-NEXT: return _impl::_impl_ClassWithIntField::makeRetained (_impl::$s5Class06returnA12WithIntFieldAA0acdE0CyF());
6161// CHECK-NEXT: }
You can’t perform that action at this time.
0 commit comments