Skip to content

Commit 2cbe8df

Browse files
authored
[NFC][DWP] Make getContributionIndex static (#141708)
Remove `getContributionIndex` declaration from header and make it static as it seems to be only used within the .cpp file.
1 parent f057a59 commit 2cbe8df

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

llvm/include/llvm/DWP/DWP.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ struct CompileUnitIdentifiers {
7070
LLVM_ABI Error write(MCStreamer &Out, ArrayRef<std::string> Inputs,
7171
OnCuIndexOverflow OverflowOptValue);
7272

73-
LLVM_ABI unsigned getContributionIndex(DWARFSectionKind Kind,
74-
uint32_t IndexVersion);
75-
7673
LLVM_ABI Error handleSection(
7774
const StringMap<std::pair<MCSection *, DWARFSectionKind>> &KnownSections,
7875
const MCSection *StrSection, const MCSection *StrOffsetSection,

llvm/lib/DWP/DWP.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,13 @@ static bool isSupportedSectionKind(DWARFSectionKind Kind) {
156156
return Kind != DW_SECT_EXT_unknown;
157157
}
158158

159-
namespace llvm {
160159
// Convert an internal section identifier into the index to use with
161160
// UnitIndexEntry::Contributions.
162-
unsigned getContributionIndex(DWARFSectionKind Kind, uint32_t IndexVersion) {
161+
static unsigned getContributionIndex(DWARFSectionKind Kind,
162+
uint32_t IndexVersion) {
163163
assert(serializeSectionKind(Kind, IndexVersion) >= DW_SECT_INFO);
164164
return serializeSectionKind(Kind, IndexVersion) - DW_SECT_INFO;
165165
}
166-
} // namespace llvm
167166

168167
// Convert a UnitIndexEntry::Contributions index to the corresponding on-disk
169168
// value of the section identifier.

0 commit comments

Comments
 (0)