summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-06-26 22:30:06 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-06-26 22:30:06 +0000
commit678eac4d05e386ba74b8a8a8bea6ec1972107248 (patch)
tree6dff26364023095e25d006ff4ba8fa1c2a03352c
parent608ab75c0b7845163d1c965b2e522c5d1a8b2624 (diff)
Use isPositionIndependent predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273828 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 5f091c88375..8b72a6c2c79 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -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.