<div dir="ltr">IMO the fact that it uses the standard names from the COFF documentation is a feature, not a bug.<div><br></div><div>The elf and macho headers in the same directory use the standard enumeration names, correct? </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 27, 2013 at 5:41 PM, Virgile Bello <span dir="ltr"><<a href="mailto:virgile.bello@gmail.com" target="_blank">virgile.bello@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>