Use LoadedObjectInfoHelper to simplify/delegate the implementation of 'clone'

llvm-svn: 307167
This commit is contained in:
David Blaikie 2017-07-05 15:24:42 +00:00
parent 8713157747
commit 15309044ba
1 changed files with 1 additions and 4 deletions

View File

@ -45,14 +45,11 @@ namespace {
// LLVM DWARF parser will not be able to parse .debug_line correctly, unless
// we assign each section some unique address. This callback method assigns
// each section an address equal to its offset in ELF object file.
class ObjectInfo : public LoadedObjectInfo {
class ObjectInfo : public LoadedObjectInfoHelper<ObjectInfo> {
public:
uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const override {
return static_cast<const ELFSectionRef &>(Sec).getOffset();
}
std::unique_ptr<LoadedObjectInfo> clone() const override {
return std::unique_ptr<LoadedObjectInfo>();
}
};
}