mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -191,7 +191,7 @@ std::string LinkEntity::mangleAsString() const {
|
||||
case Kind::ObjCClassRef: {
|
||||
llvm::SmallString<64> tempBuffer;
|
||||
StringRef name = cast<ClassDecl>(getDecl())->getObjCRuntimeName(tempBuffer);
|
||||
std::string Result("OBJC_CLASS_REF_$_");
|
||||
std::string Result("\01l_OBJC_CLASS_REF_$_");
|
||||
Result.append(name.data(), name.size());
|
||||
return Result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user