Simplify now that we always use an alignment of 2 for ELF files.

This saves 123144 bytes out of llvm-nm on powerpc64le.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-02 12:05:27 +00:00
parent 6b35bec8ef
commit 9751e35f20
8 changed files with 116 additions and 183 deletions

View File

@@ -991,11 +991,10 @@ void ELFDumper<ELFT>::printUnwindInfo() {
}
namespace {
template <>
void ELFDumper<ELFType<support::little, 2, false> >::printUnwindInfo() {
template <> void ELFDumper<ELFType<support::little, false>>::printUnwindInfo() {
const unsigned Machine = Obj->getHeader()->e_machine;
if (Machine == EM_ARM) {
ARM::EHABI::PrinterContext<ELFType<support::little, 2, false> > Ctx(W, Obj);
ARM::EHABI::PrinterContext<ELFType<support::little, false>> Ctx(W, Obj);
return Ctx.PrintUnwindInformation();
}
W.startLine() << "UnwindInfo not implemented.\n";
@@ -1075,8 +1074,7 @@ void ELFDumper<ELFT>::printAttributes() {
}
namespace {
template <>
void ELFDumper<ELFType<support::little, 2, false> >::printAttributes() {
template <> void ELFDumper<ELFType<support::little, false>>::printAttributes() {
if (Obj->getHeader()->e_machine != EM_ARM) {
W.startLine() << "Attributes not implemented.\n";
return;