[llvm] r224953 - Remove unnecessary StringRef->std::string conversion.

Alexey Samsonov vonosmas at gmail.com
Mon Dec 29 12:59:02 PST 2014


Author: samsonov
Date: Mon Dec 29 14:59:02 2014
New Revision: 224953

URL: http://llvm.org/viewvc/llvm-project?rev=224953&view=rev
Log:
Remove unnecessary StringRef->std::string conversion.

Modified:
    llvm/trunk/lib/Support/Unix/Path.inc

Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=224953&r1=224952&r2=224953&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Mon Dec 29 14:59:02 2014
@@ -150,7 +150,7 @@ std::string getMainExecutable(const char
       // /proc is not always mounted under Linux (chroot for example).
       ssize_t len = readlink(aPath.str().c_str(), exe_path, sizeof(exe_path));
       if (len >= 0)
-          return StringRef(exe_path, len);
+          return std::string(exe_path, len);
   } else {
       // Fall back to the classical detection.
       if (getprogpath(exe_path, argv0) != NULL)





More information about the llvm-commits mailing list