diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-23 04:43:11 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-23 04:43:11 +0000 |
commit | 0e7e34e476a196e0075586ef2076235edb35b8c9 (patch) | |
tree | 601dc771bbf18fc63e036be06815d25843137899 /llvm/lib/MC/MCSectionELF.cpp | |
parent | cfeb0eee06b2e36bc137d203f6c1c78bac412be1 (diff) | |
download | bcm5719-llvm-0e7e34e476a196e0075586ef2076235edb35b8c9.tar.gz bcm5719-llvm-0e7e34e476a196e0075586ef2076235edb35b8c9.zip |
Remove more duplicated code.
llvm-svn: 124056
Diffstat (limited to 'llvm/lib/MC/MCSectionELF.cpp')
-rw-r--r-- | llvm/lib/MC/MCSectionELF.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/llvm/lib/MC/MCSectionELF.cpp b/llvm/lib/MC/MCSectionELF.cpp index 4a44f5a9067..da54106a19f 100644 --- a/llvm/lib/MC/MCSectionELF.cpp +++ b/llvm/lib/MC/MCSectionELF.cpp @@ -43,37 +43,37 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, // Handle the weird solaris syntax if desired. if (MAI.usesSunStyleELFSectionSwitchSyntax() && - !(Flags & MCSectionELF::SHF_MERGE)) { - if (Flags & MCSectionELF::SHF_ALLOC) + !(Flags & ELF::SHF_MERGE)) { + if (Flags & ELF::SHF_ALLOC) OS << ",#alloc"; - if (Flags & MCSectionELF::SHF_EXECINSTR) + if (Flags & ELF::SHF_EXECINSTR) OS << ",#execinstr"; - if (Flags & MCSectionELF::SHF_WRITE) + if (Flags & ELF::SHF_WRITE) OS << ",#write"; - if (Flags & MCSectionELF::SHF_TLS) + if (Flags & ELF::SHF_TLS) OS << ",#tls"; OS << '\n'; return; } OS << ",\""; - if (Flags & MCSectionELF::SHF_ALLOC) + if (Flags & ELF::SHF_ALLOC) OS << 'a'; - if (Flags & MCSectionELF::SHF_EXECINSTR) + if (Flags & ELF::SHF_EXECINSTR) OS << 'x'; - if (Flags & MCSectionELF::SHF_WRITE) + if (Flags & ELF::SHF_WRITE) OS << 'w'; - if (Flags & MCSectionELF::SHF_MERGE) + if (Flags & ELF::SHF_MERGE) OS << 'M'; - if (Flags & MCSectionELF::SHF_STRINGS) + if (Flags & ELF::SHF_STRINGS) OS << 'S'; - if (Flags & MCSectionELF::SHF_TLS) + if (Flags & ELF::SHF_TLS) OS << 'T'; // If there are target-specific flags, print them. - if (Flags & MCSectionELF::XCORE_SHF_CP_SECTION) + if (Flags & ELF::XCORE_SHF_CP_SECTION) OS << 'c'; - if (Flags & MCSectionELF::XCORE_SHF_DP_SECTION) + if (Flags & ELF::XCORE_SHF_DP_SECTION) OS << 'd'; OS << '"'; @@ -100,7 +100,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, OS << "progbits"; if (EntrySize) { - assert(Flags & MCSectionELF::SHF_MERGE); + assert(Flags & ELF::SHF_MERGE); OS << "," << EntrySize; } @@ -108,7 +108,7 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, } bool MCSectionELF::UseCodeAlign() const { - return getFlags() & MCSectionELF::SHF_EXECINSTR; + return getFlags() & ELF::SHF_EXECINSTR; } bool MCSectionELF::isVirtualSection() const { |