[llvm] 8d3e102 - [DWARFLinker] Use an implicit conversion of SmallString to StringRef (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat May 18 11:39:28 PDT 2024
Author: Kazu Hirata
Date: 2024-05-18T11:39:23-07:00
New Revision: 8d3e1022c8883f2bfe9faccb82ce807c1cf4272c
URL: https://github.com/llvm/llvm-project/commit/8d3e1022c8883f2bfe9faccb82ce807c1cf4272c
DIFF: https://github.com/llvm/llvm-project/commit/8d3e1022c8883f2bfe9faccb82ce807c1cf4272c.diff
LOG: [DWARFLinker] Use an implicit conversion of SmallString to StringRef (NFC)
Added:
Modified:
llvm/lib/DWARFLinker/Parallel/OutputSections.h
Removed:
################################################################################
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);
More information about the llvm-commits
mailing list