[PATCH] D53727: Only call FlushFileBuffers when writing executables

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 25 14:48:29 PDT 2018


zturner added a comment.

In https://reviews.llvm.org/D53727#1276568, @ruiu wrote:

> Looks like there's a way to get a filename from a file handle on Windows (https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-getfileinformationbyhandleex).
>
> If you use this, you can check if a file name ends with ".exe", so you don't need to pass "is executable" bit around, I guess?


Theoretically you can have executables that don't end in in .exe, but I guess this probably covers 99% of cases.  Maybe it's ok, I'm not sure.


Repository:
  rL LLVM

https://reviews.llvm.org/D53727





More information about the llvm-commits mailing list