File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ static int run_driver(StringRef ExecName,
193
193
bool isRepl = false ;
194
194
195
195
// Handle integrated tools.
196
+ StringRef DriverModeArg;
196
197
if (argv.size () > 1 ) {
197
198
StringRef FirstArg (argv[1 ]);
198
199
@@ -219,6 +220,8 @@ static int run_driver(StringRef ExecName,
219
220
if (FirstArg == " repl" ) {
220
221
isRepl = true ;
221
222
argv = argv.drop_front ();
223
+ } else if (FirstArg.startswith (" --driver-mode=" )) {
224
+ DriverModeArg = FirstArg;
222
225
}
223
226
}
224
227
@@ -239,7 +242,9 @@ static int run_driver(StringRef ExecName,
239
242
std::vector<const char *> subCommandArgs;
240
243
// Rewrite the program argument.
241
244
subCommandArgs.push_back (NewDriverPath.c_str ());
242
- if (ExecName == " swiftc" ) {
245
+ if (!DriverModeArg.empty ()) {
246
+ subCommandArgs.push_back (DriverModeArg.data ());
247
+ } else if (ExecName == " swiftc" ) {
243
248
subCommandArgs.push_back (" --driver-mode=swiftc" );
244
249
} else {
245
250
assert (ExecName == " swift" );
You can’t perform that action at this time.
0 commit comments