[llvm] [BinaryFormat] Remove redundant declarations (NFC) (PR #166010)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 1 11:45:38 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/166010
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 e354d2ddcd7fe9779ad33a33cd0ab641889ca026 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 30 Oct 2025 08:09:34 -0700
Subject: [PATCH] [BinaryFormat] 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.
---
llvm/lib/BinaryFormat/Dwarf.cpp | 7 -------
1 file changed, 7 deletions(-)
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index 55fa2df632bfa..a6c7e6afdbe7a 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -1076,10 +1076,3 @@ StringRef (*const llvm::dwarf::EnumTraits<LineNumberOps>::StringFn)(unsigned) =
LNStandardString;
StringRef (*const llvm::dwarf::EnumTraits<Index>::StringFn)(unsigned) =
IndexString;
-
-constexpr char llvm::dwarf::EnumTraits<Attribute>::Type[];
-constexpr char llvm::dwarf::EnumTraits<Form>::Type[];
-constexpr char llvm::dwarf::EnumTraits<Index>::Type[];
-constexpr char llvm::dwarf::EnumTraits<Tag>::Type[];
-constexpr char llvm::dwarf::EnumTraits<LineNumberOps>::Type[];
-constexpr char llvm::dwarf::EnumTraits<LocationAtom>::Type[];
More information about the llvm-commits
mailing list