mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 05:00:26 +00:00
(re)Put const weak strings in appropriate section on Darwin.
g++dg/abi/key2.C git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a85a62f50
commit
585457e37e
@ -26,6 +26,7 @@ namespace llvm {
|
||||
|
||||
struct DarwinTargetAsmInfo: public TargetAsmInfo {
|
||||
const Section* TextCoalSection;
|
||||
const Section* ConstTextCoalSection;
|
||||
const Section* ConstDataCoalSection;
|
||||
const Section* ConstDataSection;
|
||||
const Section* DataCoalSection;
|
||||
|
@ -43,6 +43,8 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) {
|
||||
TextCoalSection =
|
||||
getNamedSection("\t__TEXT,__textcoal_nt,coalesced,pure_instructions",
|
||||
SectionFlags::Code);
|
||||
ConstTextCoalSection = getNamedSection("\t__TEXT,__const_coal,coalesced",
|
||||
SectionFlags::None);
|
||||
ConstDataCoalSection = getNamedSection("\t__DATA,__const_coal,coalesced",
|
||||
SectionFlags::None);
|
||||
ConstDataSection = getUnnamedSection(".const_data", SectionFlags::None);
|
||||
@ -95,7 +97,7 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
|
||||
(isNonStatic ? ConstDataSection : getReadOnlySection()));
|
||||
case SectionKind::RODataMergeStr:
|
||||
return (isWeak ?
|
||||
ConstDataCoalSection :
|
||||
ConstTextCoalSection :
|
||||
MergeableStringSection(cast<GlobalVariable>(GV)));
|
||||
case SectionKind::RODataMergeConst:
|
||||
return (isWeak ?
|
||||
|
Loading…
Reference in New Issue
Block a user