Use ClassDecl::ForeignKind to model Clang's objc_runtime_visible.

We're now correctly checking for inheritance, adding @objc methods,
and adding @objc protocols for both CF types and objc_runtime_visible
classes (those without visible symbols). The latter is used for some
of the types in Dispatch, which has exposed some of the classes that
were considered implementation details on past OSs.

We still don't properly implement using 'as?' to check conformance to
a Swift protocol for a CF or objc_runtime_visible type, but we can do
that later.

rdar://problem/26850367
This commit is contained in:
Jordan Rose
2016-06-30 11:20:58 -07:00
parent 53118e9a5f
commit 3b6e40c030
16 changed files with 235 additions and 65 deletions

View File

@@ -3315,10 +3315,6 @@ public:
/// the Objective-C runtime.
StringRef getObjCRuntimeName(llvm::SmallVectorImpl<char> &buffer) const;
/// Determine whether the class is only visible to the Objective-C runtime
/// and not to the linker.
bool isOnlyObjCRuntimeVisible() const;
/// Returns the appropriate kind of entry point to generate for this class,
/// based on its attributes.
///