Change if-conditionals to else-if as they should all be mutually exclusive.

No functional change intended.

llvm-svn: 330675
This commit is contained in:
Eric Christopher 2018-04-24 01:57:02 +00:00
parent 5225b9eeed
commit 29ff50454c
1 changed files with 3 additions and 3 deletions

View File

@ -498,16 +498,16 @@ bool ELFAsmParser::ParseSectionArguments(bool IsPush, SMLoc loc) {
// Set the defaults first.
if (hasPrefix(SectionName, ".rodata.") || SectionName == ".rodata1")
Flags |= ELF::SHF_ALLOC;
if (SectionName == ".fini" || SectionName == ".init" ||
else if (SectionName == ".fini" || SectionName == ".init" ||
hasPrefix(SectionName, ".text."))
Flags |= ELF::SHF_ALLOC | ELF::SHF_EXECINSTR;
if (hasPrefix(SectionName, ".data.") || SectionName == ".data1" ||
else if (hasPrefix(SectionName, ".data.") || SectionName == ".data1" ||
hasPrefix(SectionName, ".bss.") ||
hasPrefix(SectionName, ".init_array.") ||
hasPrefix(SectionName, ".fini_array.") ||
hasPrefix(SectionName, ".preinit_array."))
Flags |= ELF::SHF_ALLOC | ELF::SHF_WRITE;
if (hasPrefix(SectionName, ".tdata.") ||
else if (hasPrefix(SectionName, ".tdata.") ||
hasPrefix(SectionName, ".tbss."))
Flags |= ELF::SHF_ALLOC | ELF::SHF_WRITE | ELF::SHF_TLS;