Index: llvm/lib/Support/raw_ostream.cpp =================================================================== --- llvm/lib/Support/raw_ostream.cpp +++ llvm/lib/Support/raw_ostream.cpp @@ -792,7 +792,7 @@ // If this is a terminal, don't use buffering. Line buffering // would be a more traditional thing to do, but it's not worth // the complexity. - if (S_ISCHR(statbuf.st_mode) && isatty(FD)) + if (S_ISCHR(statbuf.st_mode) && sys::Process::FileDescriptorIsDisplayed(FD)) return 0; // Return the preferred block size. return statbuf.st_blksize;