[Runtime] Reference ObjC class objects indirectly in conformance records.

Within conformance records, reference Objective-C class objects
indirectly so the runtime can update those references appropriately.
We don't need to do this for classes with Swift metadata.

Make all OBJC_CLASS_REF symbols object-local using "\01l", which
prevents the linker from producing incorrect relative addresses.

Fixes the ABI-affecting part of rdar://problem/36310179.
This commit is contained in:
Doug Gregor
2018-03-19 15:56:04 -07:00
parent 44e230b91a
commit cd617dce4a
7 changed files with 22 additions and 10 deletions

View File

@@ -766,6 +766,9 @@ public:
bool isForeignTypeMetadataCandidate() const {
return getKind() == Kind::ForeignTypeMetadataCandidate;
}
bool isObjCClassRef() const {
return getKind() == Kind::ObjCClassRef;
}
/// Determine whether this entity will be weak-imported.
bool isWeakImported(ModuleDecl *module) const {