aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commit35b2013bf83f87daecf49c3ab39b292ef9eb6011 (patch)
treeb17fb3fe933283adf17a098d82c215ee22d1cfa0 /llvm/lib/Support/SystemUtils.cpp
parent0ddd57451ea9eeabd963645f8e9b199b6a702dd5 (diff)
downloadllvm-35b2013bf83f87daecf49c3ab39b292ef9eb6011.zip
llvm-35b2013bf83f87daecf49c3ab39b292ef9eb6011.tar.gz
llvm-35b2013bf83f87daecf49c3ab39b292ef9eb6011.tar.bz2
Don't append a dot on platforms which don't use exe suffixes.
llvm-svn: 118057
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r--llvm/lib/Support/SystemUtils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp
index db61e75..8d70616 100644
--- a/llvm/lib/Support/SystemUtils.cpp
+++ b/llvm/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;