Skip to content

Commit bddab83

Browse files
[BOLT] Remove redundant declarations (NFC) (#166893)
In C++17, static constexpr members are implicitly inline, so they no longer require an out-of-line definition. Identified with readability-redundant-declaration.
1 parent 70f4b59 commit bddab83

File tree

4 files changed

+0
-7
lines changed

4 files changed

+0
-7
lines changed

bolt/lib/Core/BinaryBasicBlock.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
namespace llvm {
2323
namespace bolt {
2424

25-
constexpr uint32_t BinaryBasicBlock::INVALID_OFFSET;
26-
2725
bool operator<(const BinaryBasicBlock &LHS, const BinaryBasicBlock &RHS) {
2826
return LHS.Index < RHS.Index;
2927
}

bolt/lib/Core/DynoStats.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ PrintDynoOpcodeStat("print-dyno-opcode-stats",
5151
namespace llvm {
5252
namespace bolt {
5353

54-
constexpr const char *DynoStats::Desc[];
55-
5654
bool DynoStats::operator<(const DynoStats &Other) const {
5755
return std::lexicographical_compare(
5856
&Stats[FIRST_DYNO_STAT], &Stats[LAST_DYNO_STAT],

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ std::vector<SectionNameAndRange> getTextSections(const BinaryContext *BC) {
159159
}
160160
}
161161

162-
constexpr uint64_t DataAggregator::KernelBaseAddr;
163-
164162
DataAggregator::~DataAggregator() { deleteTempFiles(); }
165163

166164
namespace {

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ cl::bits<GadgetScannerKind> GadgetScannersToRun(
295295
} // namespace opts
296296

297297
// FIXME: implement a better way to mark sections for replacement.
298-
constexpr const char *RewriteInstance::SectionsToOverwrite[];
299298
std::vector<std::string> RewriteInstance::DebugSectionsToOverwrite = {
300299
".debug_abbrev", ".debug_aranges", ".debug_line", ".debug_line_str",
301300
".debug_loc", ".debug_loclists", ".debug_ranges", ".debug_rnglists",

0 commit comments

Comments
 (0)