rename Mergable -> Mergeable and Writable -> Writeable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77138 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index d82710f..5da01a2 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -315,14 +315,14 @@
     case 1: Kind = SectionKind::get(SectionKind::ReadOnlyWithRelLocal); break;
     case 0:
       switch (TM.getTargetData()->getTypeAllocSize(CPE.getType())) {
-      case 4:   Kind = SectionKind::get(SectionKind::MergableConst4); break;
-      case 8:   Kind = SectionKind::get(SectionKind::MergableConst8); break;
-      case 16:  Kind = SectionKind::get(SectionKind::MergableConst16); break;
-      default:  Kind = SectionKind::get(SectionKind::MergableConst); break;
+      case 4:   Kind = SectionKind::get(SectionKind::MergeableConst4); break;
+      case 8:   Kind = SectionKind::get(SectionKind::MergeableConst8); break;
+      case 16:  Kind = SectionKind::get(SectionKind::MergeableConst16); break;
+      default:  Kind = SectionKind::get(SectionKind::MergeableConst); break;
       }
     }
 
-    const Section *S = TAI->getSectionForMergableConstant(Kind);
+    const Section *S = TAI->getSectionForMergeableConstant(Kind);
     
     // The number of sections are small, just do a linear search from the
     // last section to the first.
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index f34f86b..97b7ff0 100644
--- a/lib/CodeGen/ELFWriter.cpp
+++ b/lib/CodeGen/ELFWriter.cpp
@@ -161,15 +161,14 @@
   case 1: Kind = SectionKind::get(SectionKind::ReadOnlyWithRelLocal); break;
   case 0:
     switch (TM.getTargetData()->getTypeAllocSize(CPE.getType())) {
-    case 4:   Kind = SectionKind::get(SectionKind::MergableConst4); break;
-    case 8:   Kind = SectionKind::get(SectionKind::MergableConst8); break;
-    case 16:  Kind = SectionKind::get(SectionKind::MergableConst16); break;
-    default:  Kind = SectionKind::get(SectionKind::MergableConst); break;
+    case 4:   Kind = SectionKind::get(SectionKind::MergeableConst4); break;
+    case 8:   Kind = SectionKind::get(SectionKind::MergeableConst8); break;
+    case 16:  Kind = SectionKind::get(SectionKind::MergeableConst16); break;
+    default:  Kind = SectionKind::get(SectionKind::MergeableConst); break;
     }
   }
   
-  std::string CstPoolName = TAI->getSectionForMergableConstant(Kind)->getName();
-  return getSection(CstPoolName,
+  return getSection(TAI->getSectionForMergeableConstant(Kind)->getName(),
                     ELFSection::SHT_PROGBITS,
                     ELFSection::SHF_MERGE | ELFSection::SHF_ALLOC,
                     CPE.getAlignment());
diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp
index 778aa22..503df19 100644
--- a/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/lib/Target/DarwinTargetAsmInfo.cpp
@@ -144,21 +144,21 @@
   }
   
   // FIXME: Alignment check should be handled by section classifier.
-  if (Kind.isMergableCString())
+  if (Kind.isMergeableCString())
     return MergeableStringSection(cast<GlobalVariable>(GV));
   
-  if (Kind.isMergableConst()) {
-    if (Kind.isMergableConst4())
+  if (Kind.isMergeableConst()) {
+    if (Kind.isMergeableConst4())
       return FourByteConstantSection;
-    if (Kind.isMergableConst8())
+    if (Kind.isMergeableConst8())
       return EightByteConstantSection;
-    if (Kind.isMergableConst16() && SixteenByteConstantSection)
+    if (Kind.isMergeableConst16() && SixteenByteConstantSection)
       return SixteenByteConstantSection;
     return ReadOnlySection;  // .const
   }
   
   // FIXME: ROData -> const in -static mode that is relocatable but they happen
-  // by the static linker.  Why not mergable?
+  // by the static linker.  Why not mergeable?
   if (Kind.isReadOnly())
     return getReadOnlySection();
 
@@ -188,17 +188,17 @@
 }
 
 const Section *
-DarwinTargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const {
+DarwinTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
   // If this constant requires a relocation, we have to put it in the data
   // segment, not in the text segment.
   if (Kind.isDataRel())
     return ConstDataSection;
   
-  if (Kind.isMergableConst4())
+  if (Kind.isMergeableConst4())
     return FourByteConstantSection;
-  if (Kind.isMergableConst8())
+  if (Kind.isMergeableConst8())
     return EightByteConstantSection;
-  if (Kind.isMergableConst16() && SixteenByteConstantSection)
+  if (Kind.isMergeableConst16() && SixteenByteConstantSection)
     return SixteenByteConstantSection;
   return ReadOnlySection;  // .const
 }
diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp
index 5d8d720..258542c 100644
--- a/lib/Target/ELFTargetAsmInfo.cpp
+++ b/lib/Target/ELFTargetAsmInfo.cpp
@@ -44,11 +44,11 @@
   DataRelROLocalSection = getNamedSection("\t.data.rel.ro.local",
                                           SectionFlags::Writable);
     
-  MergableConst4Section = getNamedSection(".rodata.cst4",
+  MergeableConst4Section = getNamedSection(".rodata.cst4",
                   SectionFlags::setEntitySize(SectionFlags::Mergeable, 4));
-  MergableConst8Section = getNamedSection(".rodata.cst8",
+  MergeableConst8Section = getNamedSection(".rodata.cst8",
                   SectionFlags::setEntitySize(SectionFlags::Mergeable, 8));
-  MergableConst16Section = getNamedSection(".rodata.cst16",
+  MergeableConst16Section = getNamedSection(".rodata.cst16",
                   SectionFlags::setEntitySize(SectionFlags::Mergeable, 16));
 }
 
@@ -57,16 +57,16 @@
 ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
                                          SectionKind Kind) const {
   if (Kind.isText()) return TextSection;
-  if (Kind.isMergableCString())
+  if (Kind.isMergeableCString())
     return MergeableStringSection(cast<GlobalVariable>(GV));
   
-  if (Kind.isMergableConst()) {
-    if (Kind.isMergableConst4())
-      return MergableConst4Section;
-    if (Kind.isMergableConst8())
-      return MergableConst8Section;
-    if (Kind.isMergableConst16())
-      return MergableConst16Section;
+  if (Kind.isMergeableConst()) {
+    if (Kind.isMergeableConst4())
+      return MergeableConst4Section;
+    if (Kind.isMergeableConst8())
+      return MergeableConst8Section;
+    if (Kind.isMergeableConst16())
+      return MergeableConst16Section;
     return ReadOnlySection;  // .const
   }
   
@@ -88,11 +88,11 @@
   return DataRelROSection;
 }
 
-/// getSectionForMergableConstant - Given a mergable constant with the
+/// getSectionForMergeableConstant - Given a Mergeable constant with the
 /// specified size and relocation information, return a section that it
 /// should be placed in.
 const Section *
-ELFTargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const {
+ELFTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
   return SelectSectionForGlobal(0, Kind);
 }
 
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index c847102..205a34d 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/lib/Target/TargetAsmInfo.cpp
@@ -211,7 +211,7 @@
     Flags |= SectionFlags::TLS;
   if (Kind.isText())
     Flags |= SectionFlags::Code;
-  if (Kind.isWritable())
+  if (Kind.isWriteable())
     Flags |= SectionFlags::Writable;
 
   return Flags;
@@ -252,16 +252,16 @@
       // If initializer is a null-terminated string, put it in a "cstring"
       // section if the target has it.
       if (isConstantString(C))
-        return SectionKind::get(SectionKind::MergableCString);
+        return SectionKind::get(SectionKind::MergeableCString);
       
       // Otherwise, just drop it into a mergable constant section.  If we have
       // a section for this size, use it, otherwise use the arbitrary sized
       // mergable section.
       switch (TM.getTargetData()->getTypeAllocSize(C->getType())) {
-      case 4:  return SectionKind::get(SectionKind::MergableConst4);
-      case 8:  return SectionKind::get(SectionKind::MergableConst8);
-      case 16: return SectionKind::get(SectionKind::MergableConst16);
-      default: return SectionKind::get(SectionKind::MergableConst);
+      case 4:  return SectionKind::get(SectionKind::MergeableConst4);
+      case 8:  return SectionKind::get(SectionKind::MergeableConst8);
+      case 16: return SectionKind::get(SectionKind::MergeableConst16);
+      default: return SectionKind::get(SectionKind::MergeableConst);
       }
       
     case Constant::LocalRelocation:
@@ -377,7 +377,7 @@
 /// specified size and relocation information, return a section that it
 /// should be placed in.
 const Section *
-TargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const {
+TargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
   if (Kind.isReadOnly())
     if (const Section *S = getReadOnlySection())
       return S;
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index 9e7973a..5de9d69 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -269,7 +269,7 @@
 getSectionPrefixForUniqueGlobal(SectionKind Kind) const {
   if (Kind.isText())
     return ".text$linkonce";
-  if (Kind.isWritable())
+  if (Kind.isWriteable())
     return ".data$linkonce";
   return ".rdata$linkonce";
 }