[llvm-commits] [llvm] r117583 - /llvm/trunk/lib/Support/SystemUtils.cpp

Mikhail Glushenkov foldr at codedgers.com
Thu Oct 28 12:33:04 PDT 2010


Author: foldr
Date: Thu Oct 28 14:33:04 2010
New Revision: 117583

URL: http://llvm.org/viewvc/llvm-project?rev=117583&view=rev
Log:
Remove an unnecessary check and an unnecessary temporary.

Modified:
    llvm/trunk/lib/Support/SystemUtils.cpp

Modified: llvm/trunk/lib/Support/SystemUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SystemUtils.cpp?rev=117583&r1=117582&r2=117583&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SystemUtils.cpp (original)
+++ llvm/trunk/lib/Support/SystemUtils.cpp Thu Oct 28 14:33:04 2010
@@ -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;
 }





More information about the llvm-commits mailing list