From ba31e27f0adb88edffeacd8c18fc760ce7e0a640 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 29 Jan 2015 17:33:21 +0000 Subject: Compute the ELF SectionKind from the flags. Any code creating an MCSectionELF knows ELF and already provides the flags. SectionKind is an abstraction used by common code that uses a plain MCSection. Use the flags to compute the SectionKind. This removes a lot of guessing and boilerplate from the MCSectionELF construction. llvm-svn: 227476 --- llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter') diff --git a/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp index 569ecc56045..97a3234c28f 100644 --- a/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp @@ -52,8 +52,8 @@ void ErlangGCPrinter::finishAssembly(Module &M, GCModuleInfo &Info, // Put this in a custom .note section. AP.OutStreamer.SwitchSection( - AP.getObjFileLowering().getContext().getELFSection( - ".note.gc", ELF::SHT_PROGBITS, 0, SectionKind::getDataRel())); + AP.getObjFileLowering().getContext().getELFSection(".note.gc", + ELF::SHT_PROGBITS, 0)); // For each function... for (GCModuleInfo::FuncInfoVec::iterator FI = Info.funcinfo_begin(), -- cgit v1.2.3