return;
} else {
O << TAI->getCOMMDirective() << name << ',' << Size;
-
- // Leopard and above support aligned common symbols.
- if (Subtarget->getDarwinVers() >= 9)
- O << ',' << Align;
+ if (TAI->getCOMMDirectiveTakesAlignment())
+ O << ',' << (TAI->getAlignmentIsInBytes() ? (1 << Align) : Align);
}
} else {
if (!Subtarget->isTargetCygMing()) {
X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
X86TargetAsmInfo(TM), DarwinTargetAsmInfo(TM) {
- bool is64Bit = DTM->getSubtarget<X86Subtarget>().is64Bit();
+ const X86Subtarget* Subtarget = &DTM->getSubtarget<X86Subtarget>();
+ bool is64Bit = Subtarget->is64Bit();
AlignmentIsInBytes = false;
TextAlignFillValue = 0x90;
LCOMMDirective = "\t.lcomm\t";
SwitchToSectionDirective = "\t.section ";
StringConstantPrefix = "\1LC";
- COMMDirectiveTakesAlignment = false;
+ // Leopard and above support aligned common symbols.
+ COMMDirectiveTakesAlignment = (Subtarget->getDarwinVers() >= 9);
HasDotTypeDotSizeDirective = false;
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";