diff --git a/llvm/lib/DWARFLinker/Parallel/OutputSections.h b/llvm/lib/DWARFLinker/Parallel/OutputSections.h index 0e1f2dae54bcc..d2e4622aa7643 100644 --- a/llvm/lib/DWARFLinker/Parallel/OutputSections.h +++ b/llvm/lib/DWARFLinker/Parallel/OutputSections.h @@ -220,7 +220,7 @@ struct SectionDescriptor : SectionDescriptorBase { /// Returns section content. StringRef getContents() override { if (SectionOffsetInsideAsmPrinterOutputStart == 0) - return StringRef(Contents.data(), Contents.size()); + return Contents; return Contents.slice(SectionOffsetInsideAsmPrinterOutputStart, SectionOffsetInsideAsmPrinterOutputEnd);