Remove MergeableConst.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 29 Jan 2015 14:12:41 +0000 (14:12 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 29 Jan 2015 14:12:41 +0000 (14:12 +0000)
Only the specific ones (MergeableConst4, MergeableConst8, MergeableConst16) are
handled specially.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227440 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/SectionKind.h
lib/CodeGen/MachineFunction.cpp
lib/Target/TargetLoweringObjectFile.cpp

index 85a91c6b169886dc1e24bb5aff02c71311cbf136..9e8b68f4340c95d8e63a4dda13a4537121b1513f 100644 (file)
@@ -55,7 +55,6 @@ class SectionKind {
         /// MergeableConst - These are sections for merging fixed-length
         /// constants together.  For example, this can be used to unique
         /// constant pool entries etc.
-        MergeableConst,
 
             /// MergeableConst4 - This is a section used by 4-byte constants,
             /// for example, floats.
@@ -151,8 +150,8 @@ public:
   bool isMergeable4ByteCString() const { return K == Mergeable4ByteCString; }
 
   bool isMergeableConst() const {
-    return K == MergeableConst || K == MergeableConst4 ||
-           K == MergeableConst8 || K == MergeableConst16;
+    return K == MergeableConst4 || K == MergeableConst8 ||
+           K == MergeableConst16;
   }
   bool isMergeableConst4() const { return K == MergeableConst4; }
   bool isMergeableConst8() const { return K == MergeableConst8; }
@@ -216,7 +215,6 @@ public:
   static SectionKind getMergeable4ByteCString() {
     return get(Mergeable4ByteCString);
   }
-  static SectionKind getMergeableConst() { return get(MergeableConst); }
   static SectionKind getMergeableConst4() { return get(MergeableConst4); }
   static SectionKind getMergeableConst8() { return get(MergeableConst8); }
   static SectionKind getMergeableConst16() { return get(MergeableConst16); }
index bcb44ea3b3f8a36b6f84c84844ade38f427e7e6c..036d6964ca6c57c61db8280fbe4bdf43c1f0f54e 100644 (file)
@@ -860,7 +860,7 @@ MachineConstantPoolEntry::getSectionKind(const DataLayout *DL) const {
       Kind = SectionKind::getMergeableConst16();
       break;
     default:
-      Kind = SectionKind::getMergeableConst();
+      Kind = SectionKind::getReadOnly();
       break;
     }
   }
index 05b199b6d1f287601dd6b847a93a24b0e57a063c..25b898c1aee19e91d6f737502a322634fd02d189 100644 (file)
@@ -204,7 +204,8 @@ SectionKind TargetLoweringObjectFile::getKindForGlobal(const GlobalValue *GV,
       case 4:  return SectionKind::getMergeableConst4();
       case 8:  return SectionKind::getMergeableConst8();
       case 16: return SectionKind::getMergeableConst16();
-      default: return SectionKind::getMergeableConst();
+      default:
+        return SectionKind::getReadOnly();
       }
 
     case Constant::LocalRelocation: