diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-07-27 05:32:16 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-07-27 05:32:16 +0000 |
| commit | d8310520a75c10de2678e931f984e0c500e0ee43 (patch) | |
| tree | 416ba3b4b1c715725a43935b710b6245dd809608 /lib/Target/Sparc | |
| parent | 7b8b13ae655c54cfa770e74d11c02b04e2728dc6 (diff) | |
| download | external_llvm-d8310520a75c10de2678e931f984e0c500e0ee43.zip external_llvm-d8310520a75c10de2678e931f984e0c500e0ee43.tar.gz external_llvm-d8310520a75c10de2678e931f984e0c500e0ee43.tar.bz2 | |
Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
| -rw-r--r-- | lib/Target/Sparc/SparcTargetAsmInfo.cpp | 17 | ||||
| -rw-r--r-- | lib/Target/Sparc/SparcTargetAsmInfo.h | 4 |
2 files changed, 10 insertions, 11 deletions
diff --git a/lib/Target/Sparc/SparcTargetAsmInfo.cpp b/lib/Target/Sparc/SparcTargetAsmInfo.cpp index adec722..4bcaec0 100644 --- a/lib/Target/Sparc/SparcTargetAsmInfo.cpp +++ b/lib/Target/Sparc/SparcTargetAsmInfo.cpp @@ -27,25 +27,24 @@ SparcELFTargetAsmInfo::SparcELFTargetAsmInfo(const TargetMachine &TM) CStringSection=".rodata.str"; // Sparc normally uses named section for BSS. - BSSSection_ = getNamedSection("\t.bss", - SectionFlags::Writable | SectionFlags::BSS); + BSSSection_ = getNamedSection("\t.bss", SectionKind::BSS); } -void SparcELFTargetAsmInfo::getSectionFlags(unsigned Flags, +void SparcELFTargetAsmInfo::getSectionFlagsAsString(SectionKind Kind, SmallVectorImpl<char> &Str) const { - if (Flags & SectionFlags::Mergeable) - return ELFTargetAsmInfo::getSectionFlags(Flags, Str); + if (Kind.isMergeableConst() || Kind.isMergeableCString()) + return ELFTargetAsmInfo::getSectionFlagsAsString(Kind, Str); // FIXME: Inefficient. std::string Res; - if (!(Flags & SectionFlags::Debug)) + if (!Kind.isMetadata()) Res += ",#alloc"; - if (Flags & SectionFlags::Code) + if (Kind.isText()) Res += ",#execinstr"; - if (Flags & SectionFlags::Writable) + if (Kind.isWriteable()) Res += ",#write"; - if (Flags & SectionFlags::TLS) + if (Kind.isThreadLocal()) Res += ",#tls"; Str.append(Res.begin(), Res.end()); diff --git a/lib/Target/Sparc/SparcTargetAsmInfo.h b/lib/Target/Sparc/SparcTargetAsmInfo.h index cf65c1f..943dcef 100644 --- a/lib/Target/Sparc/SparcTargetAsmInfo.h +++ b/lib/Target/Sparc/SparcTargetAsmInfo.h @@ -24,8 +24,8 @@ namespace llvm { struct SparcELFTargetAsmInfo : public ELFTargetAsmInfo { explicit SparcELFTargetAsmInfo(const TargetMachine &TM); - virtual void getSectionFlags(unsigned Flags, - SmallVectorImpl<char> &Str) const; + virtual void getSectionFlagsAsString(SectionKind Kind, + SmallVectorImpl<char> &Str) const; }; |
