From: Chris Lattner Date: Fri, 24 Jul 2009 20:27:11 +0000 (+0000) Subject: fix some predicates X-Git-Tag: llvmorg-2.6.0~2416 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70fa4661ebd6a79570cc69c0a3d5a4991338a461;p=platform%2Fupstream%2Fllvm.git fix some predicates llvm-svn: 76999 --- diff --git a/llvm/include/llvm/Target/TargetAsmInfo.h b/llvm/include/llvm/Target/TargetAsmInfo.h index 58955c86c042..fc044b8ab9fb 100644 --- a/llvm/include/llvm/Target/TargetAsmInfo.h +++ b/llvm/include/llvm/Target/TargetAsmInfo.h @@ -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{ diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index b32be1d1fe3b..3edbe93e561f 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -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;