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
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 @@
// 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;
}