fix some predicates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76999 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index 58955c8..fc044b8 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -57,13 +57,11 @@
static inline bool isReadOnly(Kind K) {
return (K == SectionKind::ROData ||
+ K == SectionKind::DataRelRO ||
+ K == SectionKind::DataRelROLocal ||
K == SectionKind::RODataMergeConst ||
K == SectionKind::RODataMergeStr);
}
-
- static inline bool isBSS(Kind K) {
- return K == SectionKind::BSS;
- }
}
namespace SectionFlags {
@@ -601,7 +599,8 @@
/// getSpecialCasedSectionGlobals - Allow the target to completely override
/// section assignment of a global.
- /// FIXME: ELIMINATE
+ /// FIXME: ELIMINATE this by making PIC16 implement ADDRESS with
+ /// getFlagsForNamedSection.
virtual const Section *
getSpecialCasedSectionGlobals(const GlobalValue *GV,
SectionKind::Kind Kind) const{
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index b32be1d..3edbe93 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/lib/Target/TargetAsmInfo.cpp
@@ -341,7 +341,7 @@
if (Kind == SectionKind::Text)
return getTextSection();
- if (isBSS(Kind))
+ if (Kind == SectionKind::BSS)
if (const Section *S = getBSSSection_())
return S;