[lld] r251610 - [lld][MachO] Use a std::string rather than a StringRef for the section name in

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 20:57:32 PDT 2015


Author: lhames
Date: Wed Oct 28 22:57:31 2015
New Revision: 251610

URL: http://llvm.org/viewvc/llvm-project?rev=251610&view=rev
Log:
[lld][MachO] Use a std::string rather than a StringRef for the section name in
MachODefinedCustomSectionAtom.

The section names for these atoms are initialized from temporaries (e.g.
segName + "/" + sectName), so we can't use StringRef here.


Modified:
    lld/trunk/lib/ReaderWriter/MachO/Atoms.h

Modified: lld/trunk/lib/ReaderWriter/MachO/Atoms.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/Atoms.h?rev=251610&r1=251609&r2=251610&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/Atoms.h (original)
+++ lld/trunk/lib/ReaderWriter/MachO/Atoms.h Wed Oct 28 22:57:31 2015
@@ -125,7 +125,7 @@ public:
   ArrayRef<uint8_t> rawContent() const override { return ArrayRef<uint8_t>(); }
 
 private:
-  const StringRef _name;
+  const std::string _name;
   const Scope _scope;
   const uint64_t _size;
   const DefinedAtom::Alignment _align;




More information about the llvm-commits mailing list