Merge pull request #83065 from Xazax-hun/guard-more-objc-on-6.2

[6.2][cxx-interop] Types exposed from ObjC modules should be behind a macro
This commit is contained in:
Gábor Horváth
2025-07-22 11:20:22 +01:00
committed by GitHub
8 changed files with 92 additions and 7 deletions

View File

@@ -13,6 +13,7 @@
#ifndef SWIFT_NAME_TRANSLATION_H
#define SWIFT_NAME_TRANSLATION_H
#include "swift/AST/ASTContext.h"
#include "swift/AST/AttrKind.h"
#include "swift/AST/Decl.h"
#include "swift/AST/DiagnosticEngine.h"
@@ -112,6 +113,9 @@ inline bool isExposableToCxx(
return !getDeclRepresentation(VD, isZeroSized).isUnsupported();
}
bool isObjCxxOnly(const ValueDecl *VD);
bool isObjCxxOnly(const clang::Decl *D, const ASTContext &ctx);
/// Returns true if the given value decl D is visible to C++ of its
/// own accord (i.e. without considering its context)
bool isVisibleToCxx(const ValueDecl *VD, AccessLevel minRequiredAccess,

View File

@@ -632,6 +632,10 @@ namespace swift {
/// All block list configuration files to be honored in this compilation.
std::vector<std::string> BlocklistConfigFilePaths;
/// List of top level modules to be considered as if they had require ObjC
/// in their module map.
llvm::SmallVector<StringRef> ModulesRequiringObjC;
/// Whether to ignore checks that a module is resilient during
/// type-checking, SIL verification, and IR emission,
bool BypassResilienceChecks = false;