Provide convenient helpers
[oota-llvm.git] / include / llvm / Target / TargetAsmInfo.h
index e20a6c8995bcbd529804faf3186883a6fdce3c9e..04e91cb38120948bd805bddc0246e0c5b22d7402 100644 (file)
@@ -45,6 +45,18 @@ namespace llvm {
       ThreadData,       ///< Initialized TLS data objects
       ThreadBSS         ///< Uninitialized TLS data objects
     };
+
+    static inline bool isReadOnly(Kind K) {
+      return (K == SectionKind::ROData ||
+              K == SectionKind::RODataMergeConst ||
+              K == SectionKind::RODataMergeStr ||
+              K == SectionKind::SmallROData);
+    }
+
+    static inline bool isBSS(Kind K) {
+      return (K == SectionKind::BSS ||
+              K == SectionKind::SmallBSS);
+    }
   }
 
   namespace SectionFlags {