[llvm] [llvm-exegesis] Remove redundant declarations (NFC) (PR #166044)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 2 00:26:11 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/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.
>From d083281b12805ec1075fb49255b906f7aadd156b Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 1 Nov 2025 20:35:04 -0700
Subject: [PATCH] [llvm-exegesis] Remove redundant declarations (NFC)
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.
---
llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp | 2 --
llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
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