Skip to content

Commit 0605f7b

Browse files
authored
Merge pull request swiftlang#18911 from compnerd/arrayref-update
Basic: update the use of the `ExecuteNoWait` API
2 parents 1133adc + dd0dd7b commit 0605f7b

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)