File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1960,10 +1960,14 @@ namespace {
1960
1960
!Impl.SwiftContext .LangOpts .CForeignReferenceTypes )
1961
1961
return false ;
1962
1962
1963
- auto semanticsKind = evaluateOrDefault (
1964
- Impl.SwiftContext .evaluator ,
1965
- CxxRecordSemantics ({decl, Impl.SwiftContext }), {});
1966
- return semanticsKind == CxxRecordSemanticsKind::Reference;
1963
+ return decl->hasAttrs () && llvm::any_of (decl->getAttrs (), [](auto *attr) {
1964
+ if (auto swiftAttr = dyn_cast<clang::SwiftAttrAttr>(attr))
1965
+ return swiftAttr->getAttribute () == " import_reference" ||
1966
+ // TODO: Remove this once libSwift hosttools no longer
1967
+ // requires it.
1968
+ swiftAttr->getAttribute () == " import_as_ref" ;
1969
+ return false ;
1970
+ });
1967
1971
}
1968
1972
1969
1973
bool recordHasMoveOnlySemantics (const clang::RecordDecl *decl) {
You can’t perform that action at this time.
0 commit comments