diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/driver/main.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/driver/main.cc b/tools/driver/main.cc index 0b3033f..2908a0a 100644 --- a/tools/driver/main.cc +++ b/tools/driver/main.cc @@ -200,7 +200,12 @@ int main(int argc, char **argv) { if (OutputPath.empty() && Save) { llvm::SmallString<256> DefaultPath(InputPaths[CG.getMainUnit()]); - llvm::sys::path::replace_extension(DefaultPath, EmitIR ? ".ll" : ".out"); +#ifdef _WIN32 + const char *ExecutableExtension = ".exe"; +#else + const char *ExecutableExtension = ".out"; +#endif + llvm::sys::path::replace_extension(DefaultPath, EmitIR ? ".ll" : ExecutableExtension); OutputPath = std::string(DefaultPath); } for (const auto &InputPath : InputPaths) { |
