Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77184 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index 802d04a..04de225 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -58,7 +58,7 @@
   // FIXME: Why don't we always use this section?
   if (is64Bit)
     SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
-                                                   SectionFlags::Mergeable);
+                                                 SectionKind::MergeableConst16);
   LCOMMDirective = "\t.lcomm\t";
 
   // Leopard and above support aligned common symbols.
@@ -128,8 +128,7 @@
   // Set up DWARF directives
   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
 
-  BSSSection_ = getUnnamedSection("\t.bss",
-                                  SectionFlags::Writable | SectionFlags::BSS);
+  BSSSection_ = getUnnamedSection("\t.bss", SectionKind::BSS);
 
   // Debug Information
   AbsoluteDebugSectionOffsets = true;
@@ -278,13 +277,14 @@
 }
 
 
-void X86COFFTargetAsmInfo::getSectionFlags(unsigned Flags,
-                                           SmallVectorImpl<char> &Str) const {
+
+void X86COFFTargetAsmInfo::getSectionFlagsAsString(SectionKind Kind,
+                                            SmallVectorImpl<char> &Str) const {
   // FIXME: Inefficient.
   std::string Res = ",\"";
-  if (Flags & SectionFlags::Code)
+  if (Kind.isText())
     Res += 'x';
-  if (Flags & SectionFlags::Writable)
+  if (Kind.isWriteable())
     Res += 'w';
   Res += "\"";
 
@@ -314,8 +314,8 @@
 
   AlignmentIsInBytes = true;
 
-  TextSection = getUnnamedSection("_text", SectionFlags::Code);
-  DataSection = getUnnamedSection("_data", SectionFlags::Writable);
+  TextSection = getUnnamedSection("_text", SectionKind::Text);
+  DataSection = getUnnamedSection("_data", SectionKind::DataRel);
 
   JumpTableDataSection = NULL;
   SwitchToSectionDirective = "";