aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-02 20:49:48 +0000
committerDan Gohman <gohman@apple.com>2010-11-02 20:49:48 +0000
commitd4589a3f582fe5aaf399718ec004f76bc3006343 (patch)
tree5acf94dad6fae14a011f9b2868d6f8e03982faa1 /lib/Support/SystemUtils.cpp
parent6674b77adab93f5c36517ffa4cbcf9b242eea1e9 (diff)
Don't append a dot on platforms which don't use exe suffixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/SystemUtils.cpp')
-rw-r--r--lib/Support/SystemUtils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index db61e7569c..8d70616421 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/lib/Support/SystemUtils.cpp
@@ -47,7 +47,9 @@ sys::Path llvm::FindExecutable(const std::string &ExeName,
if (!Result.isEmpty()) {
Result.appendComponent(ExeName);
- Result.appendSuffix(sys::Path::GetEXESuffix());
+ StringRef EXESuffix = sys::Path::GetEXESuffix();
+ if (!EXESuffix.empty())
+ Result.appendSuffix(EXESuffix);
}
return Result;