<div dir="ltr">Attached is my preprocessed ArchSpec.cpp from llvm/clang/lldb all synched to TOT from a few moments ago (r207938). I'm using Xcode Version 5.1 (5B130a).<div><br></div><div>I'm not seeing it pick up machine.h in the output. The first time I see MACHINE_TYPE_* is from llvm/Support/MachO.</div>
<div><br></div><div>Note this file doesn't have any local changes in it.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 2, 2014 at 2:08 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.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"><div class="">> <span style="font-family:arial,sans-serif;font-size:13px">No one should be including it manually as we shouldn't have ANY code depending on platform specific headers. Try preprocessing your file and see who includes machine.h.</span><div style="font-family:arial,sans-serif;font-size:13px">
</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div></div><div style="font-family:arial,sans-serif;font-size:13px">Will do.<br></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">
On Fri, May 2, 2014 at 1:17 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On May 2, 2014, at 1:02 PM, Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br>
<br>
> On Fri, May 2, 2014 at 12:00 PM, Greg Clayton <<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>> wrote:<br>
> Looks like you are getting a conflict with the macros defined in:<br>
><br>
> <mach/machine.h><br>
><br>
> and these are ruining the defines set in:<br>
><br>
> "llvm/Support/MachO.h"<br>
><br>
> So you aren't missing anything and I am not sure why things are different for us. I thought this was fixed by adding an underscore in front of all CPU_TYPE_XXX items in MachO.h that exactly matched macros in machine.h... It is really lame that a header file in LLVM is using macros that exactly match enums.<br>
><br>
> Feature, not a bug. IMO it's lame that <mach/machine.h> uses macros instead of enums. ;)<br>
<br>
</div>I completely agree, but alas we are stuck with this on MacOSX.<br>
<div><br>
> Is <mach/machine.h> pulled in transitively, or is it an explicit include? If so, what's being used? Can it be isolated to a single cpp file?<br>
<br>
</div>No one should be including it manually as we shouldn't have ANY code depending on platform specific headers. Try preprocessing your file and see who includes machine.h.<br>
<div><div><br>
<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><div class="">-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'">
<tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>