mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-01 07:11:45 +00:00
Put const weak stuff in appropriate section on Darwin.
g++.dg/abi/key2.C llvm-svn: 51458
This commit is contained in:
parent
73677fe660
commit
7cc19db16f
@ -251,7 +251,15 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
||||
if (Subtarget->isTargetDarwin()) {
|
||||
O << "\t.globl " << name << "\n"
|
||||
<< TAI->getWeakDefDirective() << name << "\n";
|
||||
SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I);
|
||||
if (!I->isConstant())
|
||||
SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I);
|
||||
else {
|
||||
const ArrayType *AT = dyn_cast<ArrayType>(Type);
|
||||
if (AT && AT->getElementType()==Type::Int8Ty)
|
||||
SwitchToDataSection("\t.section __TEXT,__const_coal,coalesced", I);
|
||||
else
|
||||
SwitchToDataSection("\t.section __DATA,__const_coal,coalesced", I);
|
||||
}
|
||||
} else if (Subtarget->isTargetCygMing()) {
|
||||
std::string SectionName(".section\t.data$linkonce." +
|
||||
name +
|
||||
|
Loading…
x
Reference in New Issue
Block a user