[llvm] [llvm-exegesis] Remove redundant declarations (NFC) (PR #166044)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 2 00:26:48 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-tools-llvm-exegesis
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/166044.diff
2 Files Affected:
- (modified) llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.cpp (-2)
- (modified) llvm/tools/llvm-exegesis/lib/ParallelSnippetGenerator.h (+1-1)
``````````diff
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.
``````````
</details>
https://github.com/llvm/llvm-project/pull/166044
More information about the llvm-commits
mailing list