Generalize

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2008-08-08 18:25:52 +00:00
parent 25c6a087dd
commit 16b7f5101b
2 changed files with 6 additions and 6 deletions

View File

@ -806,10 +806,8 @@ void X86ATTAsmPrinter::printModuleLevelGV(const GlobalVariable* GVar) {
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()) {

View File

@ -126,7 +126,8 @@ bool X86TargetAsmInfo::ExpandInlineAsm(CallInst *CI) const {
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;
@ -156,7 +157,8 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
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";