]> granicus.if.org Git - llvm/commitdiff
Use isPositionIndependent predicate.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 26 Jun 2016 22:30:06 +0000 (22:30 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 26 Jun 2016 22:30:06 +0000 (22:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273828 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/TargetLowering.cpp

index 5f091c88375086cc37104f204fbf3a262989df05..8b72a6c2c79765ab1e7943c99b5ee6896c769570 100644 (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.