diff options
author | Eric Christopher <echristo@gmail.com> | 2018-04-24 01:57:02 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2018-04-24 01:57:02 +0000 |
commit | 29ff50454cbca7f6637e86e22c9f31b24c1a4af6 (patch) | |
tree | 37142597a5bf792ba6031975f73152706b501048 /llvm/lib/MC/MCParser/ELFAsmParser.cpp | |
parent | 5225b9eeed8dc5930701c369a21cc1b89383f4cf (diff) | |
download | bcm5719-llvm-29ff50454cbca7f6637e86e22c9f31b24c1a4af6.tar.gz bcm5719-llvm-29ff50454cbca7f6637e86e22c9f31b24c1a4af6.zip |
Change if-conditionals to else-if as they should all be mutually exclusive.
No functional change intended.
llvm-svn: 330675
Diffstat (limited to 'llvm/lib/MC/MCParser/ELFAsmParser.cpp')
-rw-r--r-- | llvm/lib/MC/MCParser/ELFAsmParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCParser/ELFAsmParser.cpp b/llvm/lib/MC/MCParser/ELFAsmParser.cpp index b9fa49e131b..1e69c384608 100644 --- a/llvm/lib/MC/MCParser/ELFAsmParser.cpp +++ b/llvm/lib/MC/MCParser/ELFAsmParser.cpp @@ -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; |