OSDN Git Service

fix some predicates
authorChris Lattner <sabre@nondot.org>
Fri, 24 Jul 2009 20:27:11 +0000 (20:27 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 24 Jul 2009 20:27:11 +0000 (20:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76999 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetAsmInfo.h
lib/Target/TargetAsmInfo.cpp

index 58955c8..fc044b8 100644 (file)
@@ -57,13 +57,11 @@ namespace llvm {
 
     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 @@ namespace llvm {
     
     /// 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{
index b32be1d..3edbe93 100644 (file)
@@ -341,7 +341,7 @@ TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
   if (Kind == SectionKind::Text)
     return getTextSection();
   
-  if (isBSS(Kind))
+  if (Kind == SectionKind::BSS)
     if (const Section *S = getBSSSection_())
       return S;