From b1556c42ced74d34c0178e19dd8b0b046862beee Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 28 Jun 2016 20:13:36 +0000 Subject: Use isPositionIndependent in a few more places. I think this converts all the simple cases that really just care about the generated code being position independent or not. The remaining uses are a bit more complicated and are checking things like "is this a library or executable" or "can this symbol be preempted". llvm-svn: 274055 --- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp') 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. -- cgit v1.2.3