<div dir="ltr">On Wed, Aug 28, 2013 at 7:19 PM, Virgile Bello <span dir="ltr"><<a href="mailto:virgile.bello@gmail.com" target="_blank">virgile.bello@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It was happening in a few files using COFF.h in LLDB for the windows branch (Windows.h is required for some typedef over Mutex, thread, socket, etc...).</div>
</blockquote><div><br></div><div>Can you write opaque wrappers for these things?  Then you could include windows.h from the .cpp file and avoid it in any headers.  Keeping windows.h out of your transitive includes is nice anyway.  You shouldn't need COFF.h in the .cpp implementation files.</div>
<div><br></div><div>In LLVM, most of this kind of functionality is in lib/Support, and nothing in include/llvm/Support includes windows.h.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>As said before, I am currently checking if it could be avoided (probably some refactoring will be needed). However I was wondering if it might not be easier to just avoid this clash at all by avoiding it in LLVM.</div>
</div></blockquote><div><br></div><div>I'd prefer it if you evaluated this first, but if it's too hard, yeah, let's change COFF.h.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Alternatively I could #undef everything right after including Windows.h.</div></div></blockquote><div><br></div><div>I'd rather avoid this.</div></div></div></div>