Skip to content

Commit 56bb603

Browse files
Address comments.
1 parent 3257479 commit 56bb603

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractor.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,6 @@ class DWARFDataExtractor : public DWARFDataExtractorBase<DWARFDataExtractor> {
4040
Other.isLittleEndian(), Other.getAddressSize()),
4141
Obj(Other.Obj), Section(Other.Section) {}
4242

43-
/// Extracts the DWARF "initial length" field, which can either be a 32-bit
44-
/// value smaller than 0xfffffff0, or the value 0xffffffff followed by a
45-
/// 64-bit length. Returns the actual length, and the DWARF format which is
46-
/// encoded in the field. In case of errors, it returns {0, DWARF32} and
47-
/// leaves the offset unchanged.
48-
LLVM_ABI std::pair<uint64_t, dwarf::DwarfFormat>
49-
getInitialLength(uint64_t *Off, Error *Err = nullptr) const;
50-
51-
std::pair<uint64_t, dwarf::DwarfFormat> getInitialLength(Cursor &C) const {
52-
return getInitialLength(&getOffset(C), &getError(C));
53-
}
54-
55-
/// Extracts a value and applies a relocation to the result if
56-
/// one exists for the given offset.
57-
LLVM_ABI uint64_t getRelocatedValue(uint32_t Size, uint64_t *Off,
58-
uint64_t *SectionIndex = nullptr,
59-
Error *Err = nullptr) const;
60-
LLVM_ABI uint64_t getRelocatedValue(Cursor &C, uint32_t Size,
61-
uint64_t *SectionIndex = nullptr) const {
62-
return getRelocatedValue(Size, &getOffset(C), SectionIndex, &getError(C));
63-
}
64-
6543
/// Extracts a value and applies a relocation to the result if
6644
/// one exists for the given offset.
6745
LLVM_ABI uint64_t getRelocatedValueImpl(uint32_t Size, uint64_t *Off,

llvm/include/llvm/DebugInfo/DWARF/DWARFDataExtractorSimple.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

2829
public:
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

Comments
 (0)