[llvm] [memprof] Remove redundant virtual (NFC) (PR #94858)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 8 07:39:35 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

'override' makes 'virtual' redundant.

Identified with modernize-use-override.

---
Full diff: https://github.com/llvm/llvm-project/pull/94858.diff


1 Files Affected:

- (modified) llvm/include/llvm/ProfileData/MemProfReader.h (+2-2) 


``````````diff
diff --git a/llvm/include/llvm/ProfileData/MemProfReader.h b/llvm/include/llvm/ProfileData/MemProfReader.h
index f0286820fa462..fbba6483abe3e 100644
--- a/llvm/include/llvm/ProfileData/MemProfReader.h
+++ b/llvm/include/llvm/ProfileData/MemProfReader.h
@@ -137,7 +137,7 @@ class RawMemProfReader final : public MemProfReader {
 public:
   RawMemProfReader(const RawMemProfReader &) = delete;
   RawMemProfReader &operator=(const RawMemProfReader &) = delete;
-  virtual ~RawMemProfReader() override = default;
+  ~RawMemProfReader() override = default;
 
   // Prints the contents of the profile in YAML format.
   void printYAML(raw_ostream &OS);
@@ -161,7 +161,7 @@ class RawMemProfReader final : public MemProfReader {
   // Returns a list of build ids recorded in the segment information.
   static std::vector<std::string> peekBuildIds(MemoryBuffer *DataBuffer);
 
-  virtual Error
+  Error
   readNextRecord(GuidMemProfRecordPair &GuidRecord,
                  std::function<const Frame(const FrameId)> Callback) override;
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/94858


More information about the llvm-commits mailing list