[llvm] r203960 - Remove unnecessary StringRef::str() call where an implicit conversion works just fine.

David Blaikie dblaikie at gmail.com
Fri Mar 14 12:53:40 PDT 2014


Author: dblaikie
Date: Fri Mar 14 14:53:39 2014
New Revision: 203960

URL: http://llvm.org/viewvc/llvm-project?rev=203960&view=rev
Log:
Remove unnecessary StringRef::str() call where an implicit conversion works just fine.

Modified:
    llvm/trunk/include/llvm/MC/MCContext.h

Modified: llvm/trunk/include/llvm/MC/MCContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCContext.h?rev=203960&r1=203959&r2=203960&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCContext.h (original)
+++ llvm/trunk/include/llvm/MC/MCContext.h Fri Mar 14 14:53:39 2014
@@ -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,





More information about the llvm-commits mailing list