Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[memprof] Remove redundant virtual (NFC) #94858

Merged

Conversation

kazutakahirata
Copy link
Contributor

'override' makes 'virtual' redundant.

Identified with modernize-use-override.

'override' makes 'virtual' redundant.

Identified with modernize-use-override.
@llvmbot llvmbot added the PGO Profile Guided Optimizations label Jun 8, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jun 8, 2024

@llvm/pr-subscribers-pgo

Author: Kazu Hirata (kazutakahirata)

Changes

'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 --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;
 

Copy link
Contributor

@teresajohnson teresajohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any harm to the virtual keyword, or just extra verbosity?

@kazutakahirata
Copy link
Contributor Author

Is there any harm to the virtual keyword, or just extra verbosity?

Just extra verbosity (and more output from clang-tidy).

@kazutakahirata kazutakahirata merged commit 6834e6d into llvm:main Jun 8, 2024
9 checks passed
@kazutakahirata kazutakahirata deleted the memprof_modernize-use-override branch June 8, 2024 15:38
nekoshirro pushed a commit to nekoshirro/Alchemist-LLVM that referenced this pull request Jun 9, 2024
'override' makes 'virtual' redundant.

Identified with modernize-use-override.

Signed-off-by: Hafidz Muzakky <ais.muzakky@gmail.com>
@HerrCai0907 HerrCai0907 mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants