From 0db11db56012a19d3f0d0ff0aad223a5bc07db05 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 27 Jun 2016 14:19:45 +0000 Subject: Move isPositionIndependent up to AsmPrinter. Use it in ppc too. llvm-svn: 273877 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/CodeGen/AsmPrinter') diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 3f2ef090b86..37099c468cb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -124,6 +124,10 @@ AsmPrinter::~AsmPrinter() { } } +bool AsmPrinter::isPositionIndependent() const { + return TM.getRelocationModel() == Reloc::PIC_; +} + /// getFunctionNumber - Return a unique ID for the current function. /// unsigned AsmPrinter::getFunctionNumber() const { -- cgit v1.2.3