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
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index db61e75..8d70616 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/lib/Support/SystemUtils.cpp
@@ -47,7 +47,9 @@
if (!Result.isEmpty()) {
Result.appendComponent(ExeName);
- Result.appendSuffix(sys::Path::GetEXESuffix());
+ StringRef EXESuffix = sys::Path::GetEXESuffix();
+ if (!EXESuffix.empty())
+ Result.appendSuffix(EXESuffix);
}
return Result;