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/AsmPrinter/AsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/AsmPrinter') diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 37099c468cb..a355e09824e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -125,7 +125,7 @@ AsmPrinter::~AsmPrinter() { } bool AsmPrinter::isPositionIndependent() const { - return TM.getRelocationModel() == Reloc::PIC_; + return TM.isPositionIndependent(); } /// getFunctionNumber - Return a unique ID for the current function. -- cgit v1.2.3