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
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index 230c5ac..c743832 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 @@
       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();