[LLVMdev] Question on llc output stream
gohman at apple.com
Wed Jul 29 08:34:45 PDT 2009
On Jul 29, 2009, at 8:09 AM, David Greene wrote:
> In llc's GetOutputStream we have this:
> raw_fd_ostream *FDOut = new raw_fd_ostream(OutputFilename.c_str(),
> Force, error);
> Why is Binary set true here? We don't know yet whether this is
> going to be an
> AsmFile or a MachOFile.
Looks like a bug. It looks like there are two copies of that code, one
case where there's an explicit OutputFilename, and one where there
right below it. Only the second one sets the Binary flag properly.
> Setting Binary=true causes the stream to be unbuffered. Is this
> what we want?
I don't see where this happens. In any case, no, Binary streams should
still be buffered.
More information about the llvm-dev