[llvm] r273828 - Use isPositionIndependent predicate.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 26 15:30:07 PDT 2016


Author: rafael
Date: Sun Jun 26 17:30:06 2016
New Revision: 273828

URL: http://llvm.org/viewvc/llvm-project?rev=273828&view=rev
Log:
Use isPositionIndependent predicate.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=273828&r1=273827&r2=273828&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sun Jun 26 17:30:06 2016
@@ -281,7 +281,7 @@ void TargetLowering::softenSetCCOperands
 /// 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.




More information about the llvm-commits mailing list