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 --- oatdump/oatdump.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'oatdump') diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index a36e5b1..d6d8808 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -92,8 +92,7 @@ class OatSymbolizer FINAL : public CodeOutput { elf_output_ = OS::CreateEmptyFile(output_name_.c_str()); - builder_.reset(new ElfBuilder( + builder_.reset(new ElfBuilder( this, elf_output_, oat_file_->GetOatHeader().GetInstructionSet(), @@ -270,8 +269,7 @@ class OatSymbolizer FINAL : public CodeOutput { pretty_name = "[Dedup]" + pretty_name; } - ElfSymtabBuilder* symtab = builder_->GetSymtabBuilder(); + ElfSymtabBuilder* symtab = builder_->GetSymtabBuilder(); symtab->AddSymbol(pretty_name, &builder_->GetTextBuilder(), oat_method.GetCodeOffset() - oat_file_->GetOatHeader().GetExecutableOffset(), @@ -300,8 +298,7 @@ class OatSymbolizer FINAL : public CodeOutput { } const OatFile* oat_file_; - std::unique_ptr > builder_; + std::unique_ptr > builder_; File* elf_output_; std::unordered_map state_; const std::string output_name_; -- cgit v1.1