aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorMikhail Glushenkov <foldr@codedgers.com>2010-10-28 19:33:04 +0000
committerMikhail Glushenkov <foldr@codedgers.com>2010-10-28 19:33:04 +0000
commit8a5ff478db80fdc0753378563b8f1c139136607a (patch)
treeeb4f0faab8c7b29e5c5b9b4a8ce865adb9ba195e /lib/Support/SystemUtils.cpp
parentc61c7549a893beca6b9101917387bceb3b16b644 (diff)
downloadexternal_llvm-8a5ff478db80fdc0753378563b8f1c139136607a.zip
external_llvm-8a5ff478db80fdc0753378563b8f1c139136607a.tar.gz
external_llvm-8a5ff478db80fdc0753378563b8f1c139136607a.tar.bz2
Remove an unnecessary check and an unnecessary temporary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/SystemUtils.cpp')
-rw-r--r--lib/Support/SystemUtils.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index c8b260c..820e7cf 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/lib/Support/SystemUtils.cpp
@@ -56,10 +56,9 @@ sys::Path llvm::FindExecutable(const std::string &ExeName,
// version of the program.
if (Result.isAbsolute()) {
Result = sys::Program::FindProgramByName(Result.str());
- if (!Result.empty())
- return Result;
+ return Result;
}
}
- return sys::Path();
+ return Result;
}