aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
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;