[PATCH] D27577: [libFuzzer] Diff 18 - Avoid name collision with Windows API.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 10:11:26 PST 2016


@kcc: No need to keep that opinion to yourself, the macro definitions are
ridiculous, we all know it :)

Agree with Adrian.  With such a messed up system of #defines etc, there's
not really a good solution.  So the best is one that keeps the silliness
limited to Windows.

On Thu, Dec 8, 2016 at 10:06 AM Adrian McCarthy via Phabricator <
reviews at reviews.llvm.org> wrote:

> amccarth added a comment.
>
> I won't object to this change, but, in my experience, the `#undef`
> approach is better.  It doesn't force you to compromise your API design,
> and it keeps the Windows-specific fixes local to the Windows-specific code.
>
> If we were to `#undef DeleteFile` and later wanted to call the actual
> WinAPI DeleteFile, we'd just have to use the actual function name, either
> DeleteFileW or DeleteFileA, which modern code should be doing anyway.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D27577
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161208/7b19aeda/attachment.html>


More information about the llvm-commits mailing list