X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fdisassembler%2FDisassembler.cxx;h=7422df561784966652b8f7e69ebb276019f2e0ea;hp=babac8249a79fb9f01d66a37c1822ba8494f5885;hb=05fded85315e1977895450456f77d740770d2a9c;hpb=8dad2658cea308b46d461f54743d8603eaf3223d diff --git a/src/disassembler/Disassembler.cxx b/src/disassembler/Disassembler.cxx index babac82..7422df5 100644 --- a/src/disassembler/Disassembler.cxx +++ b/src/disassembler/Disassembler.cxx @@ -1,17 +1,11 @@ #include "Disassembler.hxx" -namespace { - llvm::OwningPtr& - constructor_helper(const std::string& filename, - llvm::OwningPtr& binary) { - createBinary(filename, binary); - return binary; - } -} - +using namespace llvm; +using namespace llvm::object; Disassembler::Disassembler(const std::string& filename) - : _target(constructor_helper(filename, _binary)) + : _binary(createBinary(filename).get()) + , _target(_binary) { }