@@ -23,7 +23,8 @@ namespace llvm {
2323// / A DataExtractor suitable use for parsing dwarf from memory. Clients use
2424// / Relocator::getRelocatedValueImpl to relocate values as appropriate.
2525
26- template <class Relocator > class DWARFDataExtractorBase : public DataExtractor {
26+ template <typename Relocator>
27+ class DWARFDataExtractorBase : public DataExtractor {
2728
2829public:
2930 DWARFDataExtractorBase (StringRef Data, bool IsLittleEndian,
@@ -40,15 +41,14 @@ template <class Relocator> class DWARFDataExtractorBase : public DataExtractor {
4041 : DataExtractor(Other.getData().substr(0 , Length), Other.isLittleEndian(),
4142 Other.getAddressSize()) {}
4243
43- ~DWARFDataExtractorBase () {}
44-
4544 // / Extracts a value and returns it as adjusted by the Relocator
4645 LLVM_ABI uint64_t getRelocatedValue (uint32_t Size, uint64_t *Off,
4746 uint64_t *SectionIndex = nullptr ,
4847 Error *Err = nullptr ) const {
4948 return static_cast <const Relocator *>(this )->getRelocatedValueImpl (
5049 Size, Off, SectionIndex, Err);
5150 }
51+
5252 LLVM_ABI uint64_t getRelocatedValue (Cursor &C, uint32_t Size,
5353 uint64_t *SectionIndex = nullptr ) const {
5454 return getRelocatedValue (Size, &getOffset (C), SectionIndex, &getError (C));
@@ -59,6 +59,7 @@ template <class Relocator> class DWARFDataExtractorBase : public DataExtractor {
5959 uint64_t *SecIx = nullptr ) const {
6060 return getRelocatedValue (getAddressSize (), Off, SecIx);
6161 }
62+
6263 LLVM_ABI uint64_t getRelocatedAddress (Cursor &C,
6364 uint64_t *SecIx = nullptr ) const {
6465 return getRelocatedValue (getAddressSize (), &getOffset (C), SecIx,
0 commit comments