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.
needCloseParen = true;
}
- if (shouldPrintStub(TM, Subtarget)) {
+ if (Subtarget->isPICStyleStub()) {
// DARWIN/X86-32 in != static mode.
// Link-once, declaration, or Weakly-linked global variables need
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;
needCloseParen = true;
}
- if (shouldPrintStub(TM, Subtarget)) {
+ if (Subtarget->isPICStyleStub()) {
// DARWIN/X86-32 in != static mode.
// Link-once, declaration, or Weakly-linked global variables need