various minor cleanups, no functionality change.

llvm-svn: 75108
This commit is contained in:
Chris Lattner 2009-07-09 05:42:07 +00:00
parent d047d06358
commit 0667b145c4
1 changed files with 6 additions and 6 deletions

View File

@ -428,6 +428,10 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
needCloseParen = true; needCloseParen = true;
} }
// Handle dllimport linkage.
if (MO.getTargetFlags() == X86II::MO_DLLIMPORT)
O << "__imp_";
if (Subtarget->isPICStyleStub()) { if (Subtarget->isPICStyleStub()) {
// DARWIN/X86-32 in != static mode. // DARWIN/X86-32 in != static mode.
@ -457,24 +461,20 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
PrintPICBaseSymbol(); PrintPICBaseSymbol();
} }
} else { } else {
// Handle dllimport linkage.
if (MO.getTargetFlags() == X86II::MO_DLLIMPORT)
O << "__imp_";
O << Name; O << Name;
} }
printOffset(MO.getOffset());
if (needCloseParen) if (needCloseParen)
O << ')'; O << ')';
printOffset(MO.getOffset());
break; break;
} }
case MachineOperand::MO_ExternalSymbol: case MachineOperand::MO_ExternalSymbol:
/// NOTE: MO_ExternalSymbol in a non-pcrel_imm context is *only* generated /// NOTE: MO_ExternalSymbol in a non-pcrel_imm context is *only* generated
/// by _GLOBAL_OFFSET_TABLE_ on X86-32. All others are call operands, which /// by _GLOBAL_OFFSET_TABLE_ on X86-32. All others are call operands, which
/// are pcrel_imm's. /// are pcrel_imm's.
assert(!Subtarget->is64Bit() && !Subtarget->isPICStyleRIPRel()); assert(!Subtarget->is64Bit());
// These are never used as memory operands. // These are never used as memory operands.
assert(Modifier == 0 || strcmp(Modifier, "mem")); assert(Modifier == 0 || strcmp(Modifier, "mem"));
O << '$'; O << '$';