From af94b8a4416415eed616400328c0ba2648283760 Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 29 Dec 2014 20:59:02 +0000 Subject: [PATCH] Remove unnecessary StringRef->std::string conversion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224953 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Unix/Path.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index 8de94c11dce..973d010dcac 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -150,7 +150,7 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) { // /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) -- 2.34.1