From 533c207f9d2da6d913c4b10f6f757fe9d6367b10 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Wed, 22 Apr 2015 12:20:22 +0100 Subject: Simplify template parameters of Elf classes. The ELF specification defines several types which differ between 32-bit ELF and 64-bit ELF. We used to template all ELF-related methods on all of those types which was very verbose. This CL wraps all the types as typedefs in ElfTypes32 and ElfTypes64. One of those wrappers is then used as the template parameter. Change-Id: I65247c2c79d92a7c4799e988cf3e4a1b10eb4788 --- compiler/dwarf/dwarf_test.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'compiler/dwarf/dwarf_test.h') diff --git a/compiler/dwarf/dwarf_test.h b/compiler/dwarf/dwarf_test.h index d31cfa59af..99b8e793d1 100644 --- a/compiler/dwarf/dwarf_test.h +++ b/compiler/dwarf/dwarf_test.h @@ -56,8 +56,7 @@ class DwarfTest : public CommonRuntimeTest { } // Pretty-print the generated DWARF data using objdump. - template + template std::vector Objdump(bool is64bit, const char* args) { // Write simple elf file with just the DWARF sections. class NoCode : public CodeOutput { @@ -66,10 +65,9 @@ class DwarfTest : public CommonRuntimeTest { } code; ScratchFile file; InstructionSet isa = is64bit ? kX86_64 : kX86; - ElfBuilder builder( + ElfBuilder builder( &code, file.GetFile(), isa, 0, 0, 0, 0, 0, 0, false, false); - typedef ElfRawSectionBuilder Section; + typedef ElfRawSectionBuilder Section; Section debug_info(".debug_info", SHT_PROGBITS, 0, nullptr, 0, 1, 0); Section debug_abbrev(".debug_abbrev", SHT_PROGBITS, 0, nullptr, 0, 1, 0); Section debug_str(".debug_str", SHT_PROGBITS, 0, nullptr, 0, 1, 0); @@ -125,11 +123,9 @@ class DwarfTest : public CommonRuntimeTest { std::vector Objdump(bool is64bit, const char* args) { if (is64bit) { - return Objdump(is64bit, args); + return Objdump(is64bit, args); } else { - return Objdump(is64bit, args); + return Objdump(is64bit, args); } } -- cgit v1.2.3-59-g8ed1b