Skip to content

Commit f063c7e

Browse files
committed
IRGen: Rename the section pointing to rodata of generic classes to __objc_clsrolist
Also emit it per default. rdar://129299739
1 parent 2175abd commit f063c7e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/swift/AST/IRGenOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ class IRGenOptions {
554554
EnableGlobalISel(false), VirtualFunctionElimination(false),
555555
WitnessMethodElimination(false), ConditionalRuntimeRecords(false),
556556
InternalizeAtLink(false), InternalizeSymbols(false),
557-
EmitGenericRODatas(false), NoPreallocatedInstantiationCaches(false),
557+
EmitGenericRODatas(true), NoPreallocatedInstantiationCaches(false),
558558
DisableReadonlyStaticObjects(false), CollocatedMetadataFunctions(false),
559559
ColocateTypeDescriptors(true), UseRelativeProtocolWitnessTables(false),
560560
UseFragileResilientProtocolWitnesses(false),

lib/IRGen/GenDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,9 +1172,9 @@ void IRGenModule::emitGlobalLists() {
11721172
if (IRGen.Opts.EmitGenericRODatas) {
11731173
emitGlobalList(
11741174
*this, GenericRODatas, "generic_ro_datas",
1175-
GetObjCSectionName("__swift_rodatas", "regular"),
1175+
GetObjCSectionName("__objc_clsrolist", "regular"),
11761176
llvm::GlobalValue::InternalLinkage, Int8PtrTy, /*isConstant*/ false,
1177-
/*asContiguousArray*/ true, /*canBeStrippedByLinker*/ true);
1177+
/*asContiguousArray*/ true, /*canBeStrippedByLinker*/ false);
11781178
}
11791179

11801180
// Objective-C class references go in a variable with a meaningless

test/IRGen/generic_class_rodata_list.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
// CHECK: .quad 0
3131
// CHECK: .quad __CLASS_METHODS__TtC25generic_class_rodata_list9Somethin
3232

33-
// CHECK: .section __DATA,__swift_rodatas
33+
// CHECK: .section __DATA,__objc_clsrolist
3434
// CHECK: .p2align 3
3535
// CHECK:_generic_ro_datas:
3636
// CHECK: .quad ___unnamed_1+40

0 commit comments

Comments
 (0)