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

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


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

'override' makes 'virtual' redundant.

Identified with modernize-use-override.

>From 739d7d49808de15c4a907c2dce0614b4a92a1e03 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 8 Jun 2024 07:28:11 -0700
Subject: [PATCH] [memprof] Remove redundant virtual (NFC)

'override' makes 'virtual' redundant.

Identified with modernize-use-override.
---
 llvm/include/llvm/ProfileData/MemProfReader.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
 



More information about the llvm-commits mailing list