diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-09 04:43:12 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-09 04:43:12 +0000 |
| commit | b4de36ea4731c45094e42c54b4ec714ffec8bee7 (patch) | |
| tree | bc2d11761ed1b30241ff2ae1f7c96b85f3d7043a /llvm/lib | |
| parent | fef11d6e77221de0152f023c9fb4e9749e5281e8 (diff) | |
| download | bcm5719-llvm-b4de36ea4731c45094e42c54b4ec714ffec8bee7.tar.gz bcm5719-llvm-b4de36ea4731c45094e42c54b4ec714ffec8bee7.zip | |
isPICStyleStub() is now never true in -static mode, so simplify code.
llvm-svn: 75102
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index dcff76f7ab7..6624a009a70 100644 --- a/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/llvm/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -286,10 +286,6 @@ static inline bool shouldPrintPLT(TargetMachine &TM, const X86Subtarget* ST) { return ST->isTargetELF() && TM.getRelocationModel() == Reloc::PIC_; } -static inline bool shouldPrintStub(TargetMachine &TM, const X86Subtarget* ST) { - return ST->isPICStyleStub() && TM.getRelocationModel() != Reloc::Static; -} - /// print_pcrel_imm - This is used to print an immediate value that ends up /// being encoded as a pc-relative value. These print slightly differently, for /// example, a $ is not emitted. @@ -317,7 +313,7 @@ void X86ATTAsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo) { needCloseParen = true; } - if (shouldPrintStub(TM, Subtarget)) { + if (Subtarget->isPICStyleStub()) { // DARWIN/X86-32 in != static mode. // Link-once, declaration, or Weakly-linked global variables need @@ -381,10 +377,9 @@ void X86ATTAsmPrinter::print_pcrel_imm(const MachineInstr *MI, unsigned OpNo) { std::string Name(TAI->getGlobalPrefix()); Name += MO.getSymbolName(); // Print function stub suffix unless it's Mac OS X 10.5 and up. - if (shouldPrintStub(TM, Subtarget) && + if (Subtarget->isPICStyleStub() && // DARWIN/X86-32 in != static mode. - !(Subtarget->isTargetDarwin() && Subtarget->getDarwinVers() >= 9)) { - + Subtarget->getDarwinVers() < 9) { FnStubs.insert(Name); printSuffixedName(Name, "$stub"); return; @@ -475,7 +470,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo, needCloseParen = true; } - if (shouldPrintStub(TM, Subtarget)) { + if (Subtarget->isPICStyleStub()) { // DARWIN/X86-32 in != static mode. // Link-once, declaration, or Weakly-linked global variables need |

