simplify some predicates, add isMergableString()
authorChris Lattner <sabre@nondot.org>
Sun, 26 Jul 2009 00:50:43 +0000 (00:50 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 26 Jul 2009 00:50:43 +0000 (00:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77103 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetAsmInfo.h

index 15f17ba0598ee6df906f9e890624dbd8805d3819..b9a877e920a2079079c4516534b3b3df9310ae4f 100644 (file)
@@ -61,11 +61,9 @@ namespace llvm {
     Kind getKind() const { return K; }
 
     bool isReadOnly() const {
-      return (K == SectionKind::ROData ||
-              K == SectionKind::DataRelRO ||
-              K == SectionKind::DataRelROLocal ||
-              K == SectionKind::RODataMergeConst ||
-              K == SectionKind::RODataMergeStr);
+      return K == ROData ||
+             K == DataRelRO        || K == DataRelROLocal ||
+             K == RODataMergeConst || K == RODataMergeStr;
     }
 
     bool isBSS() const {
@@ -82,14 +80,14 @@ namespace llvm {
     
     bool isWritable() const {
       return isTLS() ||
-             K == SectionKind::Data ||
-             K == SectionKind::DataRel ||
-             K == SectionKind::DataRelLocal ||
-             K == SectionKind::DataRelRO ||
-             K == SectionKind::DataRelROLocal ||
-             K == SectionKind::BSS;
+             K == Data ||
+             K == DataRel   || K == DataRelLocal ||
+             K == DataRelRO || K == DataRelROLocal ||
+             K == BSS;
     }
     
+    bool isMergableString() const { return K == RODataMergeStr; }
+    
     static SectionKind get(Kind K) {
       SectionKind Res = { K };
       return Res;
@@ -106,7 +104,7 @@ namespace llvm {
     static SectionKind getRODataMergeConst() { return get(RODataMergeConst); }
     static SectionKind getThreadData()       { return get(ThreadData); }
     static SectionKind getThreadBSS()        { return get(ThreadBSS); }
-};
+  };
 
   namespace SectionFlags {
     const unsigned Invalid    = -1U;