Provide convenient helpers
[oota-llvm.git] / lib / Target / TargetAsmInfo.cpp
index eb74836aec328227076a8d4d922e6953d17e1edd..9bc0b4055e3370bdddb54e18c58a8c19a3884139 100644 (file)
@@ -306,15 +306,9 @@ TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
   } else {
     if (Kind == SectionKind::Text)
       return getTextSection_();
-    else if ((Kind == SectionKind::BSS ||
-              Kind == SectionKind::SmallBSS) &&
-             getBSSSection_())
+    else if (isBSS(Kind) && getBSSSection_())
       return getBSSSection_();
-    else if (getReadOnlySection_() &&
-             (Kind == SectionKind::ROData ||
-              Kind == SectionKind::RODataMergeConst ||
-              Kind == SectionKind::RODataMergeStr ||
-              Kind == SectionKind::SmallROData))
+    else if (getReadOnlySection_() && SectionKind::isReadOnly(Kind))
       return getReadOnlySection_();
   }