[llvm] ffe527c - [BinaryFormat] Remove redundant declarations (NFC) (#166010)

via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 1 23:20:07 PDT 2025


Author: Kazu Hirata
Date: 2025-11-01T23:20:03-07:00
New Revision: ffe527c23cd8466569eba3799ed2ca7caa172815

URL: https://github.com/llvm/llvm-project/commit/ffe527c23cd8466569eba3799ed2ca7caa172815
DIFF: https://github.com/llvm/llvm-project/commit/ffe527c23cd8466569eba3799ed2ca7caa172815.diff

LOG: [BinaryFormat] Remove redundant declarations (NFC) (#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.

Added: 
    

Modified: 
    llvm/lib/BinaryFormat/Dwarf.cpp

Removed: 
    


################################################################################
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