<div dir="ltr">@kcc: No need to keep that opinion to yourself, the macro definitions are ridiculous, we all know it :)<div><br></div><div>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.</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 8, 2016 at 10:06 AM Adrian McCarthy via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">amccarth added a comment.<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
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.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Repository:<br class="gmail_msg">
  rL LLVM<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D27577" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D27577</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>