[llvm] c5b5451 - [llvm-exegesis] Remove redundant declarations (NFC) (#166044)

via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 2 08:59:36 PST 2025


Author: Kazu Hirata
Date: 2025-11-02T08:59:32-08:00
New Revision: c5b5451a5e07c8979e29fdedd685eeba4b8ac553

URL: https://github.com/llvm/llvm-project/commit/c5b5451a5e07c8979e29fdedd685eeba4b8ac553
DIFF: https://github.com/llvm/llvm-project/commit/c5b5451a5e07c8979e29fdedd685eeba4b8ac553.diff

LOG: [llvm-exegesis] Remove redundant declarations (NFC) (#166044)

In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

This patch removes the unnecessary "const" from the in-class
declaration as well.

Identified with readability-redundant-declaration.

Added: 
    

Modified: 
    llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp
    llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp
index 79a585ec52957..aa409138ae71b 100644
--- a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp
+++ b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp
@@ -350,7 +350,5 @@ ParallelSnippetGenerator::generateCodeTemplates(
   return Result;
 }
 
-constexpr const size_t ParallelSnippetGenerator::kMinNumDifferentAddresses;
-
 } // namespace exegesis
 } // namespace llvm

diff  --git a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h
index 8a6b8569c5d4c..d3c85c0c303a2 100644
--- a/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h
+++ b/llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h
@@ -28,7 +28,7 @@ class ParallelSnippetGenerator : public SnippetGenerator {
   generateCodeTemplates(InstructionTemplate Variant,
                         const BitVector &ForbiddenRegisters) const override;
 
-  static constexpr const size_t kMinNumDifferentAddresses = 6;
+  static constexpr size_t kMinNumDifferentAddresses = 6;
 
 private:
   // Instantiates memory operands within a snippet.


        


More information about the llvm-commits mailing list