From fbd3d4a5c3738591b26a1a0374a8c0302f3ee991 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 24 Jul 2009 20:27:11 +0000 Subject: [PATCH] fix some predicates git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76999 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetAsmInfo.h | 9 ++++----- lib/Target/TargetAsmInfo.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 58955c86c04..fc044b8ab9f 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/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/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index b32be1d1fe3..3edbe93e561 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/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;