File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 32
32
#include " swift/FrontendTool/FrontendTool.h"
33
33
#include " swift/DriverTool/DriverTool.h"
34
34
#include " llvm/ADT/SmallVector.h"
35
+ #include " llvm/ADT/Triple.h"
35
36
#include " llvm/Support/CommandLine.h"
36
37
#include " llvm/Support/ConvertUTF.h"
37
38
#include " llvm/Support/Errno.h"
@@ -168,12 +169,13 @@ static bool appendSwiftDriverName(SmallString<256> &buffer) {
168
169
return true ;
169
170
}
170
171
171
- llvm::sys::path::append (buffer, " swift-driver" );
172
+ StringRef execSuffix (llvm::Triple (llvm::sys::getProcessTriple ()).isOSWindows () ? " .exe" : " " );
173
+ llvm::sys::path::append (buffer, " swift-driver" + execSuffix);
172
174
if (llvm::sys::fs::exists (buffer)) {
173
175
return true ;
174
176
}
175
177
llvm::sys::path::remove_filename (buffer);
176
- llvm::sys::path::append (buffer, " swift-driver-new" );
178
+ llvm::sys::path::append (buffer, " swift-driver-new" + execSuffix );
177
179
if (llvm::sys::fs::exists (buffer)) {
178
180
return true ;
179
181
}
You can’t perform that action at this time.
0 commit comments