aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-04-19 20:57:03 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-04-19 20:57:03 +0000
commit14e2a90b7b0bb4e53e0e66866575d143ce5997b4 (patch)
tree2b6e59e4c0fd08e4888759fe9681ff769725acc5
parent869eca129b2560a59b8aa0e8fd57b5d8f7de1f96 (diff)
downloadexternal_llvm-14e2a90b7b0bb4e53e0e66866575d143ce5997b4.zip
external_llvm-14e2a90b7b0bb4e53e0e66866575d143ce5997b4.tar.gz
external_llvm-14e2a90b7b0bb4e53e0e66866575d143ce5997b4.tar.bz2
Target/PPC: Eliminate a use of getDarwinVers().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129810 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 5ed7600..83cfc38 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -2444,7 +2444,8 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
if (!DAG.getTarget().getSubtarget<PPCSubtarget>().isJITCodeModel()) {
unsigned OpFlags = 0;
if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
- PPCSubTarget.getDarwinVers() < 9 &&
+ (!PPCSubTarget.getTargetTriple().isOSX() ||
+ PPCSubTarget.getTargetTriple().isOSXVersionLT(10, 5)) &&
(G->getGlobal()->isDeclaration() ||
G->getGlobal()->isWeakForLinker())) {
// PC-relative references to external symbols should go through $stub,
@@ -2467,7 +2468,8 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
unsigned char OpFlags = 0;
if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
- PPCSubTarget.getDarwinVers() < 9) {
+ (!PPCSubTarget.getTargetTriple().isOSX() ||
+ PPCSubTarget.getTargetTriple().isOSXVersionLT(10, 5))) {
// PC-relative references to external symbols should go through $stub,
// unless we're building with the leopard linker or later, which
// automatically synthesizes these stubs.