mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "swift/Basic/Program.h"
|
||||
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/Config/config.h"
|
||||
#include "llvm/Support/Program.h"
|
||||
|
||||
@@ -33,7 +34,9 @@ int swift::ExecuteInPlace(const char *Program, const char **args,
|
||||
|
||||
return result;
|
||||
#else
|
||||
int result = llvm::sys::ExecuteAndWait(Program, args, env);
|
||||
llvm::ArrayRef<llvm::StringRef> Env = llvm::toStringRefArray(env);
|
||||
int result =
|
||||
llvm::sys::ExecuteAndWait(Program, llvm::toStringRefArray(args), Env);
|
||||
if (result >= 0)
|
||||
exit(result);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user