[llvm] r227440 - Remove MergeableConst.

Rafael Espindola rafael.espindola at gmail.com
Thu Jan 29 06:12:42 PST 2015


Author: rafael
Date: Thu Jan 29 08:12:41 2015
New Revision: 227440

URL: http://llvm.org/viewvc/llvm-project?rev=227440&view=rev
Log:
Remove MergeableConst.

Only the specific ones (MergeableConst4, MergeableConst8, MergeableConst16) are
handled specially.

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

Modified: llvm/trunk/include/llvm/MC/SectionKind.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/SectionKind.h?rev=227440&r1=227439&r2=227440&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/SectionKind.h (original)
+++ llvm/trunk/include/llvm/MC/SectionKind.h Thu Jan 29 08:12:41 2015
@@ -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); }

Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=227440&r1=227439&r2=227440&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Thu Jan 29 08:12:41 2015
@@ -860,7 +860,7 @@ MachineConstantPoolEntry::getSectionKind
       Kind = SectionKind::getMergeableConst16();
       break;
     default:
-      Kind = SectionKind::getMergeableConst();
+      Kind = SectionKind::getReadOnly();
       break;
     }
   }

Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=227440&r1=227439&r2=227440&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Thu Jan 29 08:12:41 2015
@@ -204,7 +204,8 @@ SectionKind TargetLoweringObjectFile::ge
       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:





More information about the llvm-commits mailing list