Use isPositionIndependent predicate.

llvm-svn: 273828
This commit is contained in:
Rafael Espindola 2016-06-26 22:30:06 +00:00
parent 405e25a970
commit 12bb38d367
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ void TargetLowering::softenSetCCOperands(SelectionDAG &DAG, EVT VT,
/// returned value is a member of the MachineJumpTableInfo::JTEntryKind enum.
unsigned TargetLowering::getJumpTableEncoding() const {
// In non-pic modes, just use the address of a block.
if (getTargetMachine().getRelocationModel() != Reloc::PIC_)
if (!isPositionIndependent())
return MachineJumpTableInfo::EK_BlockAddress;
// In PIC mode, if the target supports a GPRel32 directive, use it.