aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/SystemUtils.cpp')
-rw-r--r--lib/Support/SystemUtils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index 5dcd334725..c8c323876b 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/lib/Support/SystemUtils.cpp
@@ -43,9 +43,10 @@ bool llvm::CheckBitcodeOutputToConsole(std::ostream* stream_to_check,
#undef FindExecutable // needed on windows :(
sys::Path llvm::FindExecutable(const std::string &ExeName,
const std::string &ProgramPath) {
- // First check if the given name is a fully qualified path to an executable
+ // First check if the given name is already a valid path to an executable.
sys::Path Result(ExeName);
- if (Result.isAbsolute() && Result.canExecute())
+ Result.makeAbsolute();
+ if (Result.canExecute())
return Result;
// Otherwise check the directory that the calling program is in. We can do