Skip to content

Commit dd0dd7b

Browse files
committed
Basic: update the use of the ExecuteNoWait API
This now takes `ArrayRef<StringRef>` and `Optional<ArrayRef<StringRef>>` parameters. Explicitly update the interfaces to match. This is particularly important to repair the Windows build.
1 parent 42785be commit dd0dd7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Basic/Program.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "swift/Basic/Program.h"
1414

15+
#include "llvm/ADT/StringExtras.h"
1516
#include "llvm/Config/config.h"
1617
#include "llvm/Support/Program.h"
1718

@@ -33,7 +34,9 @@ int swift::ExecuteInPlace(const char *Program, const char **args,
3334

3435
return result;
3536
#else
36-
int result = llvm::sys::ExecuteAndWait(Program, args, env);
37+
llvm::ArrayRef<llvm::StringRef> Env = llvm::toStringRefArray(env);
38+
int result =
39+
llvm::sys::ExecuteAndWait(Program, llvm::toStringRefArray(args), Env);
3740
if (result >= 0)
3841
exit(result);
3942
return result;

0 commit comments

Comments
 (0)