diff options
Diffstat (limited to 'lib/CodeGen/ELFWriter.cpp')
-rw-r--r-- | lib/CodeGen/ELFWriter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp index c0e7b93cf1..c61d4210cb 100644 --- a/lib/CodeGen/ELFWriter.cpp +++ b/lib/CodeGen/ELFWriter.cpp @@ -228,18 +228,18 @@ unsigned ELFWriter::getGlobalELFType(const GlobalValue *GV) { // getElfSectionFlags - Get the ELF Section Header flags based // on the flags defined in ELFTargetAsmInfo. -unsigned ELFWriter::getElfSectionFlags(unsigned Flags) { +unsigned ELFWriter::getElfSectionFlags(SectionKind Kind) { unsigned ElfSectionFlags = ELFSection::SHF_ALLOC; - if (Flags & SectionFlags::Code) + if (Kind.isText()) ElfSectionFlags |= ELFSection::SHF_EXECINSTR; - if (Flags & SectionFlags::Writable) + if (Kind.isWriteable()) ElfSectionFlags |= ELFSection::SHF_WRITE; - if (Flags & SectionFlags::Mergeable) + if (Kind.isMergeableConst()) ElfSectionFlags |= ELFSection::SHF_MERGE; - if (Flags & SectionFlags::TLS) + if (Kind.isThreadLocal()) ElfSectionFlags |= ELFSection::SHF_TLS; - if (Flags & SectionFlags::Strings) + if (Kind.isMergeableCString()) ElfSectionFlags |= ELFSection::SHF_STRINGS; return ElfSectionFlags; @@ -293,7 +293,7 @@ void ELFWriter::EmitGlobal(const GlobalValue *GV) { // Get ELF section from TAI const Section *S = TAI->SectionForGlobal(GV); - unsigned SectionFlags = getElfSectionFlags(S->getFlags()); + unsigned SectionFlags = getElfSectionFlags(S->getKind()); // The symbol align should update the section alignment if needed const TargetData *TD = TM.getTargetData(); |