[llvm] eb63a4a - [llvm] Remove redundant declarations (NFC) (#166713)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 06:52:02 PST 2025
Author: Kazu Hirata
Date: 2025-11-06T06:51:57-08:00
New Revision: eb63a4aa9e0cbc380b6b59bbb88d3591cc4c66e2
URL: https://github.com/llvm/llvm-project/commit/eb63a4aa9e0cbc380b6b59bbb88d3591cc4c66e2
DIFF: https://github.com/llvm/llvm-project/commit/eb63a4aa9e0cbc380b6b59bbb88d3591cc4c66e2.diff
LOG: [llvm] Remove redundant declarations (NFC) (#166713)
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.
Identified with readability-redundant-declaration.
Added:
Modified:
llvm/lib/CodeGen/SafeStack.cpp
llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
llvm/lib/Target/BPF/BPFPreserveDIType.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SafeStack.cpp b/llvm/lib/CodeGen/SafeStack.cpp
index e9ffa85c10859..6b747f343c268 100644
--- a/llvm/lib/CodeGen/SafeStack.cpp
+++ b/llvm/lib/CodeGen/SafeStack.cpp
@@ -196,8 +196,6 @@ class SafeStack {
bool run();
};
-constexpr Align SafeStack::StackAlignment;
-
uint64_t SafeStack::getStaticAllocaAllocationSize(const AllocaInst* AI) {
uint64_t Size = DL.getTypeAllocSize(AI->getAllocatedType());
if (AI->isArrayAllocation()) {
diff --git a/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp b/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
index 8c7bc2f0f6716..81303faf77b58 100644
--- a/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
+++ b/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
@@ -97,7 +97,6 @@
#define DEBUG_TYPE "bpf-abstract-member-access"
namespace llvm {
-constexpr StringRef BPFCoreSharedInfo::AmaAttr;
uint32_t BPFCoreSharedInfo::SeqNum;
Instruction *BPFCoreSharedInfo::insertPassThrough(Module *M, BasicBlock *BB,
diff --git a/llvm/lib/Target/BPF/BPFPreserveDIType.cpp b/llvm/lib/Target/BPF/BPFPreserveDIType.cpp
index d3b0c0246581b..6a11ea6bf99d9 100644
--- a/llvm/lib/Target/BPF/BPFPreserveDIType.cpp
+++ b/llvm/lib/Target/BPF/BPFPreserveDIType.cpp
@@ -27,10 +27,6 @@
#define DEBUG_TYPE "bpf-preserve-di-type"
-namespace llvm {
-constexpr StringRef BPFCoreSharedInfo::TypeIdAttr;
-} // namespace llvm
-
using namespace llvm;
namespace {
More information about the llvm-commits
mailing list