mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST,Basic: update support for process execution on Windows
Implement process launching on Windows to support macros. Prefer to use the LLVM types wherever possible. The pipes are converted into file descriptors as the types are internal to the process. This allows us to have similar paths on both sides and avoid having to drag in `Windows.h` for the definition of `HANDLE`. This is the core missing functionality for Windows to support macros.
This commit is contained in:
@@ -40,14 +40,12 @@ int ExecuteInPlace(const char *Program, const char **args,
|
||||
const char **env = nullptr);
|
||||
|
||||
struct ChildProcessInfo {
|
||||
llvm::sys::procid_t Pid;
|
||||
int WriteFileDescriptor;
|
||||
int ReadFileDescriptor;
|
||||
llvm::sys::ProcessInfo ProcessInfo;
|
||||
int Write;
|
||||
int Read;
|
||||
|
||||
ChildProcessInfo(llvm::sys::procid_t Pid, int WriteFileDescriptor,
|
||||
int ReadFileDescriptor)
|
||||
: Pid(Pid), WriteFileDescriptor(WriteFileDescriptor),
|
||||
ReadFileDescriptor(ReadFileDescriptor) {}
|
||||
ChildProcessInfo(llvm::sys::ProcessInfo ProcessInfo, int Write, int Read)
|
||||
: ProcessInfo(ProcessInfo), Write(Write), Read(Read) {}
|
||||
};
|
||||
|
||||
/// This function executes the program using the argument provided.
|
||||
|
||||
Reference in New Issue
Block a user