Skip to content

Commit 721fc69

Browse files
committed
[cxx-interop] Add back 'import_as_ref' attr for libswift hosttools.
1 parent ba7e6e4 commit 721fc69

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5771,7 +5771,10 @@ void ClangImporter::diagnoseMemberValue(const DeclName &name,
57715771
static bool hasImportAsRefAttr(const clang::RecordDecl *decl) {
57725772
return decl->hasAttrs() && llvm::any_of(decl->getAttrs(), [](auto *attr) {
57735773
if (auto swiftAttr = dyn_cast<clang::SwiftAttrAttr>(attr))
5774-
return swiftAttr->getAttribute() == "import_reference";
5774+
return swiftAttr->getAttribute() == "import_reference" ||
5775+
// TODO: Remove this once libSwift hosttools no longer
5776+
// requires it.
5777+
swiftAttr->getAttribute() == "import_as_ref";
57755778
return false;
57765779
});
57775780
}

0 commit comments

Comments
 (0)