[PATCH] D25997: Call _exit
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 11:39:14 PDT 2016
On 26 October 2016 at 13:10, Rui Ueyama <ruiu at google.com> wrote:
> ruiu added inline comments.
>
>
> ================
> Comment at: ELF/Driver.cpp:55
>
> - Driver->main(Args);
> + Driver->main(Args, CanExitEarly);
> InputFile::freePool();
> ----------------
> Instead of propagating CanExitEarly, you can set Config->ExitEarly before calling this function.
>
>
> ================
> Comment at: ELF/Writer.cpp:326
> + errs().flush();
> + _exit(0);
> + }
> ----------------
> Is even exit() expensive? If you use exit() instead of _exit(), you don't need to flush the streams.
Not sure. I think _exit is actually better for being more explicit. We
have a full list of things we have to do and do as little as possible
other than that.
Cheers,
Rafael
More information about the llvm-commits
mailing list