Remove unnecessary StringRef::str() call where an implicit conversion works just...
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Mar 2014 19:53:39 +0000 (19:53 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Mar 2014 19:53:39 +0000 (19:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203960 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCContext.h

index 08ece2b4c4838958399fd057bac4ca6f75c08c15..b3df2252109f9089f71bafc584c229cc1be9ca2e 100644 (file)
@@ -292,7 +292,7 @@ namespace llvm {
     const std::string &getMainFileName() const { return MainFileName; }
 
     /// \brief Set the main file name and override the default.
-    void setMainFileName(StringRef S) { MainFileName = S.str(); }
+    void setMainFileName(StringRef S) { MainFileName = S; }
 
     /// GetDwarfFile - creates an entry in the dwarf file and directory tables.
     unsigned GetDwarfFile(StringRef Directory, StringRef FileName,