[lldb-dev] Xcode builds
Greg Clayton
gclayton at apple.com
Fri May 2 13:17:51 PDT 2014
On May 2, 2014, at 1:02 PM, Reid Kleckner <rnk at google.com> wrote:
> On Fri, May 2, 2014 at 12:00 PM, Greg Clayton <gclayton at apple.com> wrote:
> Looks like you are getting a conflict with the macros defined in:
>
> <mach/machine.h>
>
> and these are ruining the defines set in:
>
> "llvm/Support/MachO.h"
>
> 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.
>
> Feature, not a bug. IMO it's lame that <mach/machine.h> uses macros instead of enums. ;)
I completely agree, but alas we are stuck with this on MacOSX.
> 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?
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.
More information about the lldb-dev
mailing list