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

NAKAMURA Takumi geek4civic at gmail.com
Wed Sep 1 20:46:04 PDT 2010


Author: chapuni
Date: Wed Sep  1 22:46:04 2010
New Revision: 112803

URL: http://llvm.org/viewvc/llvm-project?rev=112803&view=rev
Log:
llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.

bugpoint uses it.

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=112803&r1=112802&r2=112803&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SystemUtils.cpp (original)
+++ llvm/trunk/lib/Support/SystemUtils.cpp Wed Sep  1 22:46:04 2010
@@ -49,6 +49,10 @@
     Result.appendComponent(ExeName);
     if (Result.canExecute())
       return Result;
+    // Expect to retrieve the pathname with suffix .exe.
+    Result = sys::Program::FindProgramByName(Result.str());
+    if (!Result.empty())
+      return Result;
   }
 
   return sys::Path();





More information about the llvm-commits mailing list