<div dir="ltr">Maybe better if you do it?  This is code I haven't touched before and I don't have a clear idea of how it would work with pipes, so if you've already got everything laid out in your head then it should probably be pretty mechanical for you and I can fix up any Windows stuff that breaks.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 1, 2014 at 10:40 AM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Are you OK with working up a patch for using pipes or do you want me to do it?<br>
<span class="HOEnZb"><font color="#888888"><br>
Greg<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Aug 1, 2014, at 10:33 AM, Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br>
><br>
> That sounds fine.<br>
><br>
><br>
> On Fri, Aug 1, 2014 at 10:26 AM, Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br>
> I was actually thinking of removing this code in Driver.cpp and replacing with native pipes. This would avoid the temp file. I didn't really want to expose the pipe class we made internally. We could use #ifdef's and use pipe() for non windows and _pipe() for windows. Thoughts?<br>

><br>
> My main objection to adding temp file support to the API is the only thing that really needs it is the Driver and we could just work around this in Driver.cpp by using #ifdef and native pipes.<br>
><br>
> Comments?<br>
><br>
> > On Jul 31, 2014, at 1:46 PM, Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br>
> ><br>
> > Sorry, here's a more easily digestable patch.<br>
> ><br>
> ><br>
> > On Thu, Jul 31, 2014 at 1:45 PM, Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br>
> > mkstemp doesn't exist on Windows.  LLVM already has a support function which is the same in spirit as mkstemp.  This patch adds a method to the host layer to create a temporary file, and the implementation of this method on the private side delegates to the corresponding LLVM support function.<br>

> ><br>
> > This fixes the build on Windows and should have identical semantics on other platforms, but please verify.<br>
> ><br>
> > <mkstemp.diff><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>