mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-12 06:31:14 +00:00
Put cstrings in .cstring section when compiling for Mac OS X.
llvm-svn: 31203
This commit is contained in:
parent
5963dcb6e8
commit
3144b839f0
@ -204,9 +204,17 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
||||
// If external or appending, declare as a global symbol
|
||||
O << "\t.globl " << name << "\n";
|
||||
// FALL THROUGH
|
||||
case GlobalValue::InternalLinkage:
|
||||
case GlobalValue::InternalLinkage: {
|
||||
if (TAI->getCStringSection()) {
|
||||
const ConstantArray *CVA = dyn_cast<ConstantArray>(C);
|
||||
if (CVA && CVA->isCString()) {
|
||||
SwitchToDataSection(TAI->getCStringSection(), I);
|
||||
break;
|
||||
}
|
||||
}
|
||||
SwitchToDataSection(TAI->getDataSection(), I);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
assert(0 && "Unknown linkage type!");
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
|
||||
PrivateGlobalPrefix = "L"; // Marker for constant pool idxs
|
||||
ConstantPoolSection = "\t.const\n";
|
||||
JumpTableDataSection = "\t.const\n";
|
||||
CStringSection = "\t.cstring";
|
||||
FourByteConstantSection = "\t.literal4\n";
|
||||
EightByteConstantSection = "\t.literal8\n";
|
||||
if (Subtarget->is64Bit())
|
||||
|
Loading…
x
Reference in New Issue
Block a user