mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
c6e38cd485
Because of how name builders used to lazy gather namespaces on the first requested name, the objects were self mutating. As such only non-const references could be used to pass them around. Since that is no longer the case, this restores most of lost const qualifiers.
43 lines
1013 B
C++
43 lines
1013 B
C++
#pragma once
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
|
|
#include "revng/Yield/Function.h"
|
|
|
|
namespace detail {
|
|
class DissassemblyHelperImpl;
|
|
}
|
|
namespace model {
|
|
class Function;
|
|
}
|
|
namespace efa {
|
|
class ControlFlowGraph;
|
|
}
|
|
class LLVMDisassemblerInterface;
|
|
class RawBinaryView;
|
|
|
|
class DissassemblyHelper {
|
|
private:
|
|
std::unique_ptr<detail::DissassemblyHelperImpl> Internal;
|
|
|
|
public:
|
|
explicit DissassemblyHelper();
|
|
~DissassemblyHelper();
|
|
|
|
yield::Function disassemble(const model::Function &Function,
|
|
const efa::ControlFlowGraph &Metadata,
|
|
const RawBinaryView &BinaryView,
|
|
const model::Binary &Binary,
|
|
const model::AssemblyNameBuilder &NameBuilder);
|
|
|
|
private:
|
|
LLVMDisassemblerInterface &
|
|
getDisassemblerFor(MetaAddressType::Values AddressType,
|
|
const model::DisassemblyConfiguration &);
|
|
};
|