diff --git a/llvm/include/llvm/DWP/DWP.h b/llvm/include/llvm/DWP/DWP.h index 37d2d27af5b6b..a759bae10d160 100644 --- a/llvm/include/llvm/DWP/DWP.h +++ b/llvm/include/llvm/DWP/DWP.h @@ -70,9 +70,6 @@ struct CompileUnitIdentifiers { LLVM_ABI Error write(MCStreamer &Out, ArrayRef Inputs, OnCuIndexOverflow OverflowOptValue); -LLVM_ABI unsigned getContributionIndex(DWARFSectionKind Kind, - uint32_t IndexVersion); - LLVM_ABI Error handleSection( const StringMap> &KnownSections, const MCSection *StrSection, const MCSection *StrOffsetSection, diff --git a/llvm/lib/DWP/DWP.cpp b/llvm/lib/DWP/DWP.cpp index fecd184ca68a8..dc364017bf82e 100644 --- a/llvm/lib/DWP/DWP.cpp +++ b/llvm/lib/DWP/DWP.cpp @@ -156,14 +156,13 @@ static bool isSupportedSectionKind(DWARFSectionKind Kind) { return Kind != DW_SECT_EXT_unknown; } -namespace llvm { // Convert an internal section identifier into the index to use with // UnitIndexEntry::Contributions. -unsigned getContributionIndex(DWARFSectionKind Kind, uint32_t IndexVersion) { +static unsigned getContributionIndex(DWARFSectionKind Kind, + uint32_t IndexVersion) { assert(serializeSectionKind(Kind, IndexVersion) >= DW_SECT_INFO); return serializeSectionKind(Kind, IndexVersion) - DW_SECT_INFO; } -} // namespace llvm // Convert a UnitIndexEntry::Contributions index to the corresponding on-disk // value of the section identifier.