mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-22 09:29:31 +00:00
Remove unnecessary StringRef->std::string conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224953 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0bd2ffae08
commit
af94b8a441
@ -150,7 +150,7 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) {
|
|||||||
// /proc is not always mounted under Linux (chroot for example).
|
// /proc is not always mounted under Linux (chroot for example).
|
||||||
ssize_t len = readlink(aPath.str().c_str(), exe_path, sizeof(exe_path));
|
ssize_t len = readlink(aPath.str().c_str(), exe_path, sizeof(exe_path));
|
||||||
if (len >= 0)
|
if (len >= 0)
|
||||||
return StringRef(exe_path, len);
|
return std::string(exe_path, len);
|
||||||
} else {
|
} else {
|
||||||
// Fall back to the classical detection.
|
// Fall back to the classical detection.
|
||||||
if (getprogpath(exe_path, argv0) != NULL)
|
if (getprogpath(exe_path, argv0) != NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user