diff options
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index ac68bcdb426..cb3224bfb43 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3510,7 +3510,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) { MachinePointerInfo::getJumpTable(DAG.getMachineFunction()), MemVT, false, false, false, 0); Addr = LD; - if (TM.getRelocationModel() == Reloc::PIC_) { + if (TM.isPositionIndependent()) { // For PIC, the sequence is: // BRIND(load(Jumptable + index) + RelocBase) // RelocBase can be JumpTable, GOT or some sort of global base. diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 10dcb0a266d..184f0805692 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -45,7 +45,7 @@ const char *TargetLowering::getTargetNodeName(unsigned Opcode) const { } bool TargetLowering::isPositionIndependent() const { - return getTargetMachine().getRelocationModel() == Reloc::PIC_; + return getTargetMachine().isPositionIndependent(); } /// Check whether a given call node is in tail position within its function. If |