diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-27 23:15:57 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-06-27 23:15:57 +0000 |
| commit | 3beef8d6db3688b8265728a3b05970cd9628f523 (patch) | |
| tree | 310d78331dae592b820e026554e21456ed5535d7 /llvm/lib/Target/PowerPC | |
| parent | 990ff38786ce2300a38eeaaba510c40170223ef6 (diff) | |
| download | bcm5719-llvm-3beef8d6db3688b8265728a3b05970cd9628f523.tar.gz bcm5719-llvm-3beef8d6db3688b8265728a3b05970cd9628f523.zip | |
Move shouldAssumeDSOLocal to Target.
Should fix the shared library build.
llvm-svn: 273958
Diffstat (limited to 'llvm/lib/Target/PowerPC')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCSubtarget.cpp | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 3d3cd414942..b895f3fe80c 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -4278,7 +4278,7 @@ PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag, SDValue &Chain, // 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. - Reloc::Model RM = DAG.getTarget().getRelocationModel(); + const TargetMachine &TM = DAG.getTarget(); const Triple &TargetTriple = Subtarget.getTargetTriple(); bool OldMachOLinker = TargetTriple.isMacOSX() && TargetTriple.isMacOSXVersionLT(10, 5); @@ -4286,7 +4286,7 @@ PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag, SDValue &Chain, const GlobalValue *GV = nullptr; if (auto *G = dyn_cast<GlobalAddressSDNode>(Callee)) GV = G->getGlobal(); - bool Local = shouldAssumeDSOLocal(RM, TargetTriple, *Mod, GV); + bool Local = TM.shouldAssumeDSOLocal(*Mod, GV); bool UsePlt = !Local && (OldMachOLinker || (Subtarget.isTargetELF() && !isPPC64)); diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp index 577d2d73895..312a2d4c0d5 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp @@ -153,8 +153,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV) const { if (!HasLazyResolverStubs) return false; - if (!shouldAssumeDSOLocal(TM.getRelocationModel(), TM.getTargetTriple(), - *GV->getParent(), GV)) + if (!TM.shouldAssumeDSOLocal(*GV->getParent(), GV)) return true; // 32 bit macho has no relocation for a-b if a is undefined, even if b is in // the section that is being relocated. This means we have to use o load even |

