Use isPositionIndependent predicate. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2016-06-26 22:38:44 +00:00
parent 9dfcab0b93
commit a0e42848da

View File

@ -326,7 +326,7 @@ TargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
return false;
// If the code is position independent we will have to add a base register.
if (RM == Reloc::PIC_)
if (isPositionIndependent())
return false;
// Otherwise we can do it.