Extract a few variables to make 'if' smaller. NFC.

llvm-svn: 273497
This commit is contained in:
Rafael Espindola 2016-06-22 21:56:34 +00:00
parent 47efe1f6db
commit 45bb5c69a0
1 changed files with 8 additions and 7 deletions

View File

@ -4284,13 +4284,14 @@ PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag, SDValue &Chain,
// A call to a TLS address is actually an indirect call to a // A call to a TLS address is actually an indirect call to a
// thread-specific pointer. // thread-specific pointer.
unsigned OpFlags = 0; unsigned OpFlags = 0;
if ((DAG.getTarget().getRelocationModel() != Reloc::Static && Reloc::Model RM = DAG.getTarget().getRelocationModel();
(Subtarget.getTargetTriple().isMacOSX() && const Triple &TargetTriple = Subtarget.getTargetTriple();
Subtarget.getTargetTriple().isMacOSXVersionLT(10, 5)) && const GlobalValue *GV = G->getGlobal();
!G->getGlobal()->isStrongDefinitionForLinker()) || if ((RM != Reloc::Static &&
(Subtarget.isTargetELF() && !isPPC64 && (TargetTriple.isMacOSX() && TargetTriple.isMacOSXVersionLT(10, 5)) &&
!G->getGlobal()->hasLocalLinkage() && !GV->isStrongDefinitionForLinker()) ||
DAG.getTarget().getRelocationModel() == Reloc::PIC_)) { (Subtarget.isTargetELF() && !isPPC64 && !GV->hasLocalLinkage() &&
RM == Reloc::PIC_)) {
// PC-relative references to external symbols should go through $stub, // PC-relative references to external symbols should go through $stub,
// unless we're building with the leopard linker or later, which // unless we're building with the leopard linker or later, which
// automatically synthesizes these stubs. // automatically synthesizes these stubs.