projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b51633b
)
llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Thu, 2 Sep 2010 03:46:04 +0000
(
03:46
+0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Thu, 2 Sep 2010 03:46:04 +0000
(
03:46
+0000)
bugpoint uses it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112803
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/SystemUtils.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/SystemUtils.cpp
b/lib/Support/SystemUtils.cpp
index 299032f1871562b6f35fef059c2b8d5c638fa8a4..421b38111e0963600976e846d46352dd39f2c3af 100644
(file)
--- a/
lib/Support/SystemUtils.cpp
+++ b/
lib/Support/SystemUtils.cpp
@@
-49,6
+49,10
@@
sys::Path llvm::FindExecutable(const std::string &ExeName,
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();