summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitfdba1308ee17366f4ec0251f2bcb4d4a1ea0fb19 (patch)
tree250c7cd93e1742e4ffc903fd5c7f22925d276362 /llvm/lib/Support/SystemUtils.cpp
parentd7faab5c9578cb66827cc9b44d548fed31d5b358 (diff)
downloadbcm5719-llvm-fdba1308ee17366f4ec0251f2bcb4d4a1ea0fb19.tar.gz
bcm5719-llvm-fdba1308ee17366f4ec0251f2bcb4d4a1ea0fb19.zip
Remove an unnecessary check and an unnecessary temporary.
llvm-svn: 117583
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r--llvm/lib/Support/SystemUtils.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp
index c8b260c2e3d..820e7cfbb17 100644
--- a/llvm/lib/Support/SystemUtils.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud