[PATCH] D28470: Support outputting to /dev/null
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 12:14:51 PST 2017
Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
> ruiu added inline comments.
>
>
> ================
> Comment at: lib/Support/FileOutputBuffer.cpp:63
> return EC;
> else
> + IsRegular = false;
> ----------------
> Remove `else`.
Will do.
> ================
> Comment at: lib/Support/FileOutputBuffer.cpp:74
>
> // Create new file in same directory but with random name.
> SmallString<128> TempFilePath;
> ----------------
> Update the comment.
Will do.
> ================
> Comment at: lib/Support/FileOutputBuffer.cpp:92
>
> sys::RemoveFileOnSignal(TempFilePath);
>
> ----------------
> You want to call this only when IsRegular.
Why? It is a good think to remove the temporary file in both cases.
Cheers,
Rafael
More information about the llvm-commits
mailing list