Skip to content

[6.0] IRGen: Rename the section pointing to rodata of generic classest to __objc_clsrolist #74215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/AST/IRGenOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ class IRGenOptions {
EnableGlobalISel(false), VirtualFunctionElimination(false),
WitnessMethodElimination(false), ConditionalRuntimeRecords(false),
InternalizeAtLink(false), InternalizeSymbols(false),
EmitGenericRODatas(false), NoPreallocatedInstantiationCaches(false),
EmitGenericRODatas(true), NoPreallocatedInstantiationCaches(false),
DisableReadonlyStaticObjects(false), CollocatedMetadataFunctions(false),
ColocateTypeDescriptors(true), UseRelativeProtocolWitnessTables(false),
UseFragileResilientProtocolWitnesses(false),
Expand Down
4 changes: 2 additions & 2 deletions lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,9 +1167,9 @@ void IRGenModule::emitGlobalLists() {
if (IRGen.Opts.EmitGenericRODatas) {
emitGlobalList(
*this, GenericRODatas, "generic_ro_datas",
GetObjCSectionName("__swift_rodatas", "regular"),
GetObjCSectionName("__objc_clsrolist", "regular"),
llvm::GlobalValue::InternalLinkage, Int8PtrTy, /*isConstant*/ false,
/*asContiguousArray*/ true, /*canBeStrippedByLinker*/ true);
/*asContiguousArray*/ true, /*canBeStrippedByLinker*/ false);
}

// Objective-C class references go in a variable with a meaningless
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/generic_class_rodata_list.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// CHECK: .quad 0
// CHECK: .quad __CLASS_METHODS__TtC25generic_class_rodata_list9Somethin

// CHECK: .section __DATA,__swift_rodatas
// CHECK: .section __DATA,__objc_clsrolist
// CHECK: .p2align 3
// CHECK:_generic_ro_datas:
// CHECK: .quad ___unnamed_1+40
Expand Down