[bolt] Remove redundaunt virtual specifiers (NFC)
Identified with modernize-use-override.
This commit is contained in:
parent
b498a8991e
commit
f081ec20b5
|
@ -226,22 +226,22 @@ public:
|
||||||
static void setAddressWriter(DebugAddrWriter *AddrW) { AddrWriter = AddrW; }
|
static void setAddressWriter(DebugAddrWriter *AddrW) { AddrWriter = AddrW; }
|
||||||
|
|
||||||
/// Add ranges with caching.
|
/// Add ranges with caching.
|
||||||
virtual uint64_t addRanges(
|
uint64_t addRanges(
|
||||||
DebugAddressRangesVector &&Ranges,
|
DebugAddressRangesVector &&Ranges,
|
||||||
std::map<DebugAddressRangesVector, uint64_t> &CachedRanges) override;
|
std::map<DebugAddressRangesVector, uint64_t> &CachedRanges) override;
|
||||||
|
|
||||||
/// Add ranges and return offset into section.
|
/// Add ranges and return offset into section.
|
||||||
virtual uint64_t addRanges(const DebugAddressRangesVector &Ranges) override;
|
uint64_t addRanges(const DebugAddressRangesVector &Ranges) override;
|
||||||
|
|
||||||
virtual std::unique_ptr<DebugBufferVector> releaseBuffer() override {
|
std::unique_ptr<DebugBufferVector> releaseBuffer() override {
|
||||||
return std::move(RangesBuffer);
|
return std::move(RangesBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Needs to be invoked before each \p CU is processed.
|
/// Needs to be invoked before each \p CU is processed.
|
||||||
void virtual initSection(DWARFUnit &CU) override;
|
void initSection(DWARFUnit &CU) override;
|
||||||
|
|
||||||
/// Writes out range lists for a current CU being processed.
|
/// Writes out range lists for a current CU being processed.
|
||||||
void virtual finalizeSection() override;
|
void finalizeSection() override;
|
||||||
|
|
||||||
// Returns true if section is empty.
|
// Returns true if section is empty.
|
||||||
bool empty() { return RangesBuffer->empty(); }
|
bool empty() { return RangesBuffer->empty(); }
|
||||||
|
@ -391,15 +391,15 @@ public:
|
||||||
DebugAddrWriterDwarf5(BinaryContext *BC) : DebugAddrWriter(BC) {}
|
DebugAddrWriterDwarf5(BinaryContext *BC) : DebugAddrWriter(BC) {}
|
||||||
|
|
||||||
/// Creates consolidated .debug_addr section, and builds DWOID to offset map.
|
/// Creates consolidated .debug_addr section, and builds DWOID to offset map.
|
||||||
virtual AddressSectionBuffer finalize() override;
|
AddressSectionBuffer finalize() override;
|
||||||
/// Given DWARFUnit \p Unit returns offset of this CU in to .debug_addr
|
/// Given DWARFUnit \p Unit returns offset of this CU in to .debug_addr
|
||||||
/// section.
|
/// section.
|
||||||
virtual uint64_t getOffset(DWARFUnit &Unit) override;
|
uint64_t getOffset(DWARFUnit &Unit) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Given DWARFUnit \p Unit returns either DWO ID or it's offset within
|
/// Given DWARFUnit \p Unit returns either DWO ID or it's offset within
|
||||||
/// .debug_info.
|
/// .debug_info.
|
||||||
virtual uint64_t getCUID(DWARFUnit &Unit) override {
|
uint64_t getCUID(DWARFUnit &Unit) override {
|
||||||
if (Unit.isDWOUnit()) {
|
if (Unit.isDWOUnit()) {
|
||||||
DWARFUnit *SkeletonCU = Unit.getLinkedUnit();
|
DWARFUnit *SkeletonCU = Unit.getLinkedUnit();
|
||||||
return SkeletonCU->getOffset();
|
return SkeletonCU->getOffset();
|
||||||
|
@ -561,7 +561,7 @@ public:
|
||||||
static void setAddressWriter(DebugAddrWriter *AddrW) { AddrWriter = AddrW; }
|
static void setAddressWriter(DebugAddrWriter *AddrW) { AddrWriter = AddrW; }
|
||||||
|
|
||||||
/// Stores location lists internally to be written out during finalize phase.
|
/// Stores location lists internally to be written out during finalize phase.
|
||||||
virtual void addList(AttrInfo &AttrVal, DebugLocationsVector &LocList,
|
void addList(AttrInfo &AttrVal, DebugLocationsVector &LocList,
|
||||||
DebugInfoBinaryPatcher &DebugInfoPatcher,
|
DebugInfoBinaryPatcher &DebugInfoPatcher,
|
||||||
DebugAbbrevWriter &AbbrevWriter) override;
|
DebugAbbrevWriter &AbbrevWriter) override;
|
||||||
|
|
||||||
|
@ -685,7 +685,7 @@ public:
|
||||||
|
|
||||||
/// This function takes in \p BinaryContents, applies patches to it and
|
/// This function takes in \p BinaryContents, applies patches to it and
|
||||||
/// returns an updated string.
|
/// returns an updated string.
|
||||||
virtual std::string patchBinary(StringRef BinaryContents) override;
|
std::string patchBinary(StringRef BinaryContents) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugInfoBinaryPatcher : public SimpleBinaryPatcher {
|
class DebugInfoBinaryPatcher : public SimpleBinaryPatcher {
|
||||||
|
@ -843,7 +843,7 @@ public:
|
||||||
std::string Value;
|
std::string Value;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual PatcherKind getKind() const override {
|
PatcherKind getKind() const override {
|
||||||
return PatcherKind::DebugInfoBinaryPatcher;
|
return PatcherKind::DebugInfoBinaryPatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,22 +853,22 @@ public:
|
||||||
|
|
||||||
/// This function takes in \p BinaryContents, and re-writes it with new
|
/// This function takes in \p BinaryContents, and re-writes it with new
|
||||||
/// patches inserted into it. It returns an updated string.
|
/// patches inserted into it. It returns an updated string.
|
||||||
virtual std::string patchBinary(StringRef BinaryContents) override;
|
std::string patchBinary(StringRef BinaryContents) override;
|
||||||
|
|
||||||
/// Adds a patch to put the integer \p NewValue encoded as a 64-bit
|
/// Adds a patch to put the integer \p NewValue encoded as a 64-bit
|
||||||
/// little-endian value at offset \p Offset.
|
/// little-endian value at offset \p Offset.
|
||||||
virtual void addLE64Patch(uint64_t Offset, uint64_t NewValue) override;
|
void addLE64Patch(uint64_t Offset, uint64_t NewValue) override;
|
||||||
|
|
||||||
/// Adds a patch to put the integer \p NewValue encoded as a 32-bit
|
/// Adds a patch to put the integer \p NewValue encoded as a 32-bit
|
||||||
/// little-endian value at offset \p Offset.
|
/// little-endian value at offset \p Offset.
|
||||||
/// The \p OldValueSize is the size of the old value that will be replaced.
|
/// The \p OldValueSize is the size of the old value that will be replaced.
|
||||||
virtual void addLE32Patch(uint64_t Offset, uint32_t NewValue,
|
void addLE32Patch(uint64_t Offset, uint32_t NewValue,
|
||||||
uint32_t OldValueSize = 4) override;
|
uint32_t OldValueSize = 4) override;
|
||||||
|
|
||||||
/// Add a patch at \p Offset with \p Value using unsigned LEB128 encoding with
|
/// Add a patch at \p Offset with \p Value using unsigned LEB128 encoding with
|
||||||
/// size \p OldValueSize.
|
/// size \p OldValueSize.
|
||||||
/// The \p OldValueSize is the size of the old value that will be replaced.
|
/// The \p OldValueSize is the size of the old value that will be replaced.
|
||||||
virtual void addUDataPatch(uint64_t Offset, uint64_t Value,
|
void addUDataPatch(uint64_t Offset, uint64_t Value,
|
||||||
uint32_t OldValueSize) override;
|
uint32_t OldValueSize) override;
|
||||||
|
|
||||||
/// Adds a label \p Offset for DWARF UNit.
|
/// Adds a label \p Offset for DWARF UNit.
|
||||||
|
|
|
@ -109,7 +109,7 @@ public:
|
||||||
/// starting at (or containing) 'Addr'.
|
/// starting at (or containing) 'Addr'.
|
||||||
std::pair<size_t, size_t> getEntriesForAddress(const uint64_t Addr) const;
|
std::pair<size_t, size_t> getEntriesForAddress(const uint64_t Addr) const;
|
||||||
|
|
||||||
virtual bool isJumpTable() const override { return true; }
|
bool isJumpTable() const override { return true; }
|
||||||
|
|
||||||
/// Change all entries of the jump table in \p JTAddress pointing to
|
/// Change all entries of the jump table in \p JTAddress pointing to
|
||||||
/// \p OldDest to \p NewDest. Return false if unsuccessful.
|
/// \p OldDest to \p NewDest. Return false if unsuccessful.
|
||||||
|
@ -120,7 +120,7 @@ public:
|
||||||
void updateOriginal();
|
void updateOriginal();
|
||||||
|
|
||||||
/// Print for debugging purposes.
|
/// Print for debugging purposes.
|
||||||
virtual void print(raw_ostream &OS) const override;
|
void print(raw_ostream &OS) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace bolt
|
} // namespace bolt
|
||||||
|
|
|
@ -268,18 +268,18 @@ public:
|
||||||
|
|
||||||
bool isTrustedSource() const override { return false; }
|
bool isTrustedSource() const override { return false; }
|
||||||
|
|
||||||
virtual Error preprocessProfile(BinaryContext &BC) override;
|
Error preprocessProfile(BinaryContext &BC) override;
|
||||||
|
|
||||||
virtual Error readProfilePreCFG(BinaryContext &BC) override;
|
Error readProfilePreCFG(BinaryContext &BC) override;
|
||||||
|
|
||||||
virtual Error readProfile(BinaryContext &BC) override;
|
Error readProfile(BinaryContext &BC) override;
|
||||||
|
|
||||||
virtual bool hasLocalsWithFileName() const override;
|
bool hasLocalsWithFileName() const override;
|
||||||
|
|
||||||
virtual bool mayHaveProfileData(const BinaryFunction &BF) override;
|
bool mayHaveProfileData(const BinaryFunction &BF) override;
|
||||||
|
|
||||||
/// Return all event names used to collect this profile
|
/// Return all event names used to collect this profile
|
||||||
virtual StringSet<> getEventNames() const override { return EventNames; }
|
StringSet<> getEventNames() const override { return EventNames; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Read profile information available for the function.
|
/// Read profile information available for the function.
|
||||||
|
|
|
@ -33,9 +33,9 @@ public:
|
||||||
|
|
||||||
Error preprocessProfile(BinaryContext &BC) override;
|
Error preprocessProfile(BinaryContext &BC) override;
|
||||||
|
|
||||||
virtual bool hasLocalsWithFileName() const override;
|
bool hasLocalsWithFileName() const override;
|
||||||
|
|
||||||
virtual bool mayHaveProfileData(const BinaryFunction &BF) override;
|
bool mayHaveProfileData(const BinaryFunction &BF) override;
|
||||||
|
|
||||||
/// Check if the file contains YAML.
|
/// Check if the file contains YAML.
|
||||||
static bool isYAML(StringRef Filename);
|
static bool isYAML(StringRef Filename);
|
||||||
|
|
|
@ -574,7 +574,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual std::unique_ptr<MCInstMatcher>
|
std::unique_ptr<MCInstMatcher>
|
||||||
matchAdd(std::unique_ptr<MCInstMatcher> A,
|
matchAdd(std::unique_ptr<MCInstMatcher> A,
|
||||||
std::unique_ptr<MCInstMatcher> B) const override {
|
std::unique_ptr<MCInstMatcher> B) const override {
|
||||||
return std::unique_ptr<MCInstMatcher>(
|
return std::unique_ptr<MCInstMatcher>(
|
||||||
|
@ -612,7 +612,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual std::unique_ptr<MCInstMatcher>
|
std::unique_ptr<MCInstMatcher>
|
||||||
matchLoadAddr(std::unique_ptr<MCInstMatcher> Target) const override {
|
matchLoadAddr(std::unique_ptr<MCInstMatcher> Target) const override {
|
||||||
return std::unique_ptr<MCInstMatcher>(new LEAMatcher(std::move(Target)));
|
return std::unique_ptr<MCInstMatcher>(new LEAMatcher(std::move(Target)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue