diff options
Diffstat (limited to 'llvm/lib/Support/Unix/Program.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Program.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc index be59bb0..0893420 100644 --- a/llvm/lib/Support/Unix/Program.inc +++ b/llvm/lib/Support/Unix/Program.inc @@ -71,7 +71,8 @@ ErrorOr<std::string> sys::findProgramByName(StringRef Name, assert(!Name.empty() && "Must have a name!"); // Use the given path verbatim if it contains any slashes; this matches // the behavior of sh(1) and friends. - if (Name.find('/') != StringRef::npos) return std::string(Name); + if (Name.contains('/')) + return std::string(Name); SmallVector<StringRef, 16> EnvironmentPaths; if (Paths.empty()) |