[lld] [lld] Remove redundant declarations (NFC) (PR #166712)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 5 22:09:58 PST 2025


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

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

Identified with readability-redundant-declaration.


>From 8a1c859922e62a58f2f3211b117d501e972c99f0 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 5 Nov 2025 10:07:36 -0800
Subject: [PATCH] [lld] Remove redundant declarations (NFC)

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

Identified with readability-redundant-declaration.
---
 lld/ELF/SyntheticSections.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index a4150ebfa1653..9a70c0d19c41d 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -54,8 +54,6 @@ using llvm::support::endian::read32le;
 using llvm::support::endian::write32le;
 using llvm::support::endian::write64le;
 
-constexpr size_t MergeNoTailSection::numShards;
-
 static uint64_t readUint(Ctx &ctx, uint8_t *buf) {
   return ctx.arg.is64 ? read64(ctx, buf) : read32(ctx, buf);
 }



More information about the llvm-commits mailing list