mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[6.2][cxx-interop] Types exposed from ObjC modules should be behind a macro
Explanation: We the generated reverse interop headers to be valid C++, so every declaration coming from an Obj-C module should be behind an ifdef. Unfortunately, we do not always have this information but we do know that our frameworks contain Obj-C code. So this PR makes sure every entity coming from our frameworks are behind ifdef. Issues: rdar://152836730 Original PRs: #83002 Risk: Low, the change is narrow and straightforward. Testing: Added a compiler test. Reviewers: @egorzhdan
This commit is contained in:
committed by
Gabor Horvath
parent
234a41567f
commit
ab123929f6
@@ -112,6 +112,9 @@ inline bool isExposableToCxx(
|
||||
return !getDeclRepresentation(VD, isZeroSized).isUnsupported();
|
||||
}
|
||||
|
||||
bool isObjCxxOnly(const ValueDecl *VD);
|
||||
bool isObjCxxOnly(const clang::Decl *D);
|
||||
|
||||
/// 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,
|
||||
|
||||
Reference in New Issue
Block a user