diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-23 04:28:49 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-01-23 04:28:49 +0000 |
commit | c85dca66e68c9fa6ffa8471c64113b12d8d94fb1 (patch) | |
tree | 824d5c8c6638eb390436a8923d6435e5b94226ef /lib/MC/MCSectionELF.cpp | |
parent | 5c96c69161aa4480c432027e363d0ea1aa34acee (diff) |
Remove duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124054 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCSectionELF.cpp')
-rw-r--r-- | lib/MC/MCSectionELF.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/MC/MCSectionELF.cpp b/lib/MC/MCSectionELF.cpp index a53489790d..4a44f5a906 100644 --- a/lib/MC/MCSectionELF.cpp +++ b/lib/MC/MCSectionELF.cpp @@ -11,7 +11,9 @@ #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/Support/ELF.h" #include "llvm/Support/raw_ostream.h" + using namespace llvm; MCSectionELF::~MCSectionELF() {} // anchor. @@ -84,17 +86,17 @@ void MCSectionELF::PrintSwitchToSection(const MCAsmInfo &MAI, else OS << '@'; - if (Type == MCSectionELF::SHT_INIT_ARRAY) + if (Type == ELF::SHT_INIT_ARRAY) OS << "init_array"; - else if (Type == MCSectionELF::SHT_FINI_ARRAY) + else if (Type == ELF::SHT_FINI_ARRAY) OS << "fini_array"; - else if (Type == MCSectionELF::SHT_PREINIT_ARRAY) + else if (Type == ELF::SHT_PREINIT_ARRAY) OS << "preinit_array"; - else if (Type == MCSectionELF::SHT_NOBITS) + else if (Type == ELF::SHT_NOBITS) OS << "nobits"; - else if (Type == MCSectionELF::SHT_NOTE) + else if (Type == ELF::SHT_NOTE) OS << "note"; - else if (Type == MCSectionELF::SHT_PROGBITS) + else if (Type == ELF::SHT_PROGBITS) OS << "progbits"; if (EntrySize) { @@ -110,7 +112,7 @@ bool MCSectionELF::UseCodeAlign() const { } bool MCSectionELF::isVirtualSection() const { - return getType() == MCSectionELF::SHT_NOBITS; + return getType() == ELF::SHT_NOBITS; } // HasCommonSymbols - True if this section holds common symbols, this is |