diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp --- a/clang/lib/CodeGen/CGObjCMac.cpp +++ b/clang/lib/CodeGen/CGObjCMac.cpp @@ -1978,6 +1978,7 @@ return V; } +// This is only used when `-fno-constant-cfstrings` is given ConstantAddress CGObjCCommonMac::GenerateConstantNSString(const StringLiteral *Literal) { unsigned StringLength = 0; @@ -2029,10 +2030,8 @@ GV = Fields.finishAndCreateGlobal("_unnamed_nsstring_", Alignment, /*constant*/ true, llvm::GlobalVariable::PrivateLinkage); - const char *NSStringSection = "__OBJC,__cstring_object,regular,no_dead_strip"; - const char *NSStringNonFragileABISection = - "__DATA,__objc_stringobj,regular,no_dead_strip"; - // FIXME. Fix section. + const char *NSStringSection = "__OBJC,__cstring_object,regular"; + const char *NSStringNonFragileABISection = "__DATA,__objc_stringobj,regular"; GV->setSection(CGM.getLangOpts().ObjCRuntime.isNonFragile() ? NSStringNonFragileABISection : NSStringSection);