[objcopy][MachO] Clean up Section ctors, NFC
authorAlexander Shaposhnikov <ashaposhnikov@google.com>
Fri, 14 Oct 2022 22:37:35 +0000 (22:37 +0000)
committerAlexander Shaposhnikov <ashaposhnikov@google.com>
Sat, 15 Oct 2022 00:53:52 +0000 (00:53 +0000)
llvm/lib/ObjCopy/MachO/MachOObject.cpp

index 015ba14..699d251 100644 (file)
@@ -14,11 +14,11 @@ using namespace llvm;
 using namespace llvm::objcopy::macho;
 
 Section::Section(StringRef SegName, StringRef SectName)
-    : Segname(std::string(SegName)), Sectname(std::string(SectName)),
+    : Segname(SegName), Sectname(SectName),
       CanonicalName((Twine(SegName) + Twine(',') + SectName).str()) {}
 
 Section::Section(StringRef SegName, StringRef SectName, StringRef Content)
-    : Segname(std::string(SegName)), Sectname(std::string(SectName)),
+    : Segname(SegName), Sectname(SectName),
       CanonicalName((Twine(SegName) + Twine(',') + SectName).str()),
       Content(Content) {}