aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Unix/Program.inc
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-01-17 20:22:58 -0800
committerKazu Hirata <kazu@google.com>2024-01-17 20:22:58 -0800
commit7e6482b3d8bbc31ddb005dd30cd50ded780a360a (patch)
treed97eaab59bca672cd6a28866f3fa3bd2351c4a2e /llvm/lib/Support/Unix/Program.inc
parent7f2408fba3106319f64880794d555edad26d7add (diff)
downloadllvm-7e6482b3d8bbc31ddb005dd30cd50ded780a360a.zip
llvm-7e6482b3d8bbc31ddb005dd30cd50ded780a360a.tar.gz
llvm-7e6482b3d8bbc31ddb005dd30cd50ded780a360a.tar.bz2
[Support] Use SmallString::operator std::string (NFC)
Diffstat (limited to 'llvm/lib/Support/Unix/Program.inc')
-rw-r--r--llvm/lib/Support/Unix/Program.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc
index 260719b..5d9757b 100644
--- a/llvm/lib/Support/Unix/Program.inc
+++ b/llvm/lib/Support/Unix/Program.inc
@@ -91,7 +91,7 @@ ErrorOr<std::string> sys::findProgramByName(StringRef Name,
SmallString<128> FilePath(Path);
sys::path::append(FilePath, Name);
if (sys::fs::can_execute(FilePath.c_str()))
- return std::string(FilePath.str()); // Found the executable!
+ return std::string(FilePath); // Found the executable!
}
return errc::no_such_file_or_directory;
}