From a87dea4f8c546ca748f1777a8d1cabcc06515d91 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 31 Jul 2009 18:48:30 +0000 Subject: switch off of 'Section' onto MCSection. We're not properly using MCSection subclasses yet, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77708 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/ELFWriter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/ELFWriter.cpp') diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp index 230c5ac4be..c7438329e3 100644 --- a/lib/CodeGen/ELFWriter.cpp +++ b/lib/CodeGen/ELFWriter.cpp @@ -43,6 +43,7 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCSection.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetELFWriterInfo.h" @@ -334,8 +335,8 @@ void ELFWriter::EmitGlobal(const GlobalValue *GV) { TM.getTargetLowering()->getObjFileLowering(); // Get the ELF section where this global belongs from TLOF - const Section *S = TLOF.SectionForGlobal(GV, Mang, TM); - unsigned SectionFlags = getElfSectionFlags(S->getKind()); + const MCSection *S = TLOF.SectionForGlobal(GV, Mang, TM); + unsigned SectionFlags = getElfSectionFlags(((MCSectionELF*)S)->getKind()); // The symbol align should update the section alignment if needed const TargetData *TD = TM.getTargetData(); -- cgit v1.2.3-18-g5258