Don't save a temporary string into a StringRef field.
authorJeffrey Yasskin <jyasskin@google.com>
Mon, 15 Mar 2010 06:59:21 +0000 (06:59 +0000)
committerJeffrey Yasskin <jyasskin@google.com>
Mon, 15 Mar 2010 06:59:21 +0000 (06:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98538 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCSectionELF.h

index 41c17bd8fa187d476cb832f7af54e44e36421f65..cdd2f73b3484bbc741d312d2e165ce96d889c871 100644 (file)
@@ -39,7 +39,7 @@ class MCSectionELF : public MCSection {
 protected:
   MCSectionELF(StringRef Section, unsigned type, unsigned flags,
                SectionKind K, bool isExplicit)
-    : MCSection(K), SectionName(Section.str()), Type(type), Flags(flags), 
+    : MCSection(K), SectionName(Section), Type(type), Flags(flags), 
       IsExplicit(isExplicit) {}
 public: