<div dir="ltr">Hello,<div><br></div><div>I noticed that if include\llvm\Support is included alongside Windows.h, there will be many define conflict leading to compilation errors, such as:</div><div><br></div><div><div>COFF.h (enum): enum MachineTypes { IMAGE_FILE_MACHINE_UNKNOWN   = 0x0, ... };</div>

</div><div><br></div><div>and<br></div><div><br></div><div>winnt.h (same but define): #define IMAGE_FILE_MACHINE_UNKNOWN 0</div><div><br></div><div>Of course I could try to avoid to include both (but it's rather difficult and would require lot of refactoring -- we have this clash currently in LLDB MinGW32 port).</div>

<div>I was wondering if instead it was possible to simply rename those enum little bit differently in COFF.h so that it doesn't clash?</div><div>I know windows.h is quite invasive, so maybe it's better not try to collide with any of its weird define.</div>

<div><br></div><div>If that makes sense I'm fine with doing the patch.</div><div>If yes, feel free to propose an alternative naming prefix or scheme.</div><div><br></div><div>Note that if tools depend on COFFDumper::printFileHeaders output, it might still need to print as it was before -- so the easiest choice might be to maybe just drop the IMAGE_ (anyway it's in llvm::COFF so it shouldn't matter). Is it important?</div>

<div><br></div><div>Thanks,</div><div>Virgile</div></div>