Skip to content

Commit 0654bca

Browse files
authored
Merge pull request #60149 from zoecarver/disable-eager-import
[cxx-interop] Add back 'import_as_ref' attr for libswift hosttools.
2 parents 023c9a0 + 721fc69 commit 0654bca

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
@@ -5785,7 +5785,10 @@ void ClangImporter::diagnoseMemberValue(const DeclName &name,
57855785
static bool hasImportAsRefAttr(const clang::RecordDecl *decl) {
57865786
return decl->hasAttrs() && llvm::any_of(decl->getAttrs(), [](auto *attr) {
57875787
if (auto swiftAttr = dyn_cast<clang::SwiftAttrAttr>(attr))
5788-
return swiftAttr->getAttribute() == "import_reference";
5788+
return swiftAttr->getAttribute() == "import_reference" ||
5789+
// TODO: Remove this once libSwift hosttools no longer
5790+
// requires it.
5791+
swiftAttr->getAttribute() == "import_as_ref";
57895792
return false;
57905793
});
57915794
}

0 commit comments

Comments
 (0)