Set PPCII::MO_DARWIN_STUB only on MacOSX < 10.5.

llvm-svn: 135866
This commit is contained in:
Roman Divacky 2011-07-24 08:22:56 +00:00
parent a37a065c33
commit aaba17e89b
1 changed files with 2 additions and 2 deletions

View File

@ -2550,7 +2550,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
if (!DAG.getTarget().getSubtarget<PPCSubtarget>().isJITCodeModel()) {
unsigned OpFlags = 0;
if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
(!PPCSubTarget.getTargetTriple().isMacOSX() ||
(PPCSubTarget.getTargetTriple().isMacOSX() &&
PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5)) &&
(G->getGlobal()->isDeclaration() ||
G->getGlobal()->isWeakForLinker())) {
@ -2574,7 +2574,7 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
unsigned char OpFlags = 0;
if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
(!PPCSubTarget.getTargetTriple().isMacOSX() ||
(PPCSubTarget.getTargetTriple().isMacOSX() &&
PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5))) {
// PC-relative references to external symbols should go through $stub,
// unless we're building with the leopard linker or later, which