<div dir="ltr">I tried adjusting the ArchSpec.cpp headers like so:<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font size="1" face="courier new, monospace">//===-- ArchSpec.cpp --------------------------------------------*- C++ -*-===//</font></div>
</div><div><div><font size="1" face="courier new, monospace">//</font></div></div><div><div><font size="1" face="courier new, monospace">//                     The LLVM Compiler Infrastructure</font></div></div><div><div>
<font size="1" face="courier new, monospace">//</font></div></div><div><div><font size="1" face="courier new, monospace">// This file is distributed under the University of Illinois Open Source</font></div></div><div><div>
<font size="1" face="courier new, monospace">// License. See LICENSE.TXT for details.</font></div></div><div><div><font size="1" face="courier new, monospace">//</font></div></div><div><div><font size="1" face="courier new, monospace">//===----------------------------------------------------------------------===//</font></div>
</div><div><div><font size="1" face="courier new, monospace"><br></font></div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="courier new, monospace" size="1">// 1. *tfiala* added this one here</font></div>
</blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font size="1" face="courier new, monospace">#include "llvm/Support/MachO.h"</font></div></div><div><div><font size="1" face="courier new, monospace">#include "lldb/Core/ArchSpec.h"</font></div>
</div><div><div><font size="1" face="courier new, monospace"><br></font></div></div><div><div><font size="1" face="courier new, monospace">#include <stdio.h></font></div></div><div><div><font size="1" face="courier new, monospace">#include <errno.h></font></div>
</div><div><div><font size="1" face="courier new, monospace"><br></font></div></div><div><div><font size="1" face="courier new, monospace">#include <string></font></div></div><div><div><font size="1" face="courier new, monospace"><br>
</font></div></div><div><div><font size="1" face="courier new, monospace">#include "llvm/Support/COFF.h"</font></div></div><div><div><font size="1" face="courier new, monospace">#include "llvm/Support/ELF.h"</font></div>
</div><div><div><font size="1" face="courier new, monospace">#include "llvm/Support/Host.h"</font></div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font size="1" face="courier new, monospace">// 3. *tfiala* also tried commenting out below</font></div>
</div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font size="1" face="courier new, monospace">#include "lldb/Utility/SafeMachO.h"</font></div><div><span style="font-family:'courier new',monospace;font-size:x-small">// 2. *tfiala* added this one here</span></div>
<div><span style="font-family:'courier new',monospace;font-size:x-small">#include "llvm/Support/MachO.h"</span></div></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div>
</blockquote><div><span style="font-family:'courier new',monospace;font-size:x-small">#include "lldb/Core/RegularExpression.h"</span><br></div></div><div><div><font size="1" face="courier new, monospace">#include "lldb/Host/Endian.h"</font></div>
</div><div><div><font size="1" face="courier new, monospace">#include "lldb/Host/Host.h"</font></div></div><div><div><font size="1" face="courier new, monospace">#include "lldb/Target/Platform.h"</font></div>
</div></blockquote><div><br></div><div>At first I just added the element at (1.) above.  That gave me the same error as before.  I then added it after the SafeMachO.h include at (2.) above while keeping (1.) in, just in case SafeMachO.h was pulling in something that wasn't .  That didn't work either.  Finally I tried commenting out (3.) just in case that was doing something that failed.  That gave me different errors and was clearly wrong.</div>
<div><br></div><div>Any other ideas?</div><div><br></div><div>-Todd  </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 2, 2014 at 12:03 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">Thanks, Greg.  I'll give that a shot!</div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div class="">On Fri, May 2, 2014 at 12:00 PM, Greg Clayton <span dir="ltr"><<a href="mailto:gclayton@apple.com" target="_blank">gclayton@apple.com</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">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>
You might be able to fix it by #including the "llvm/Support/MachO.h" first in the file before any other files.<br>
<div><br>
<br>
On May 2, 2014, at 9:51 AM, Todd Fiala <<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>> wrote:<br>
<br>
> Hey guys,<br>
><br>
> I'm getting errors like this on lldb TOT building within Xcode:<br>
> CompileC /Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/Objects-normal/x86_64/ArchSpec.o source/Core/ArchSpec.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler<br>


><br>
>     cd /Users/tfiala/lldb/svn/llvm/tools/lldb<br>
><br>
>     export LANG=en_US.US-ASCII<br>
><br>
</div></div>>     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -stdlib=libc++ -Wno-trigraphs -fpascal-strings -O0 -Wmissing-field-initializers -Wno-missing-prototypes -Wnon-virtual-dtor -Woverloaded-virtual -Wno-exit-time-destructors -Wmissing-braces -Wparentheses -Wswitch -Wno-unused-function -Wunused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wno-bool-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DLLDB_CONFIGURATION_DEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarat!<br>


 ions -Winvalid-offsetof -mmacosx-version-min=10.7 -g -Wno-sign-conversion -iquote /Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/liblldb-core-generated-files.hmap -I/Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/liblldb-core-own-target-headers.hmap -I/Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/liblldb-core-all-target-headers.hmap -iquote /Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/liblldb-core-project-headers.hmap -iquote/Users/tfiala/lldb/svn/llvm/tools/lldb/include -iquote/Users/tfiala/lldb/svn/llvm/tools/lldb/source -iquote/Users/tfiala/lldb/svn/llvm/tools/lldb/llvm/include -iquote/Users/tfiala/lldb/svn/llvm/too!<br>


 ls/lldb/llvm/tools/clang/include -iquote/Users/tfiala/lldb/svn/llvm/tools/lldb/llvm-build/Release+Asserts/x86_64/include -iquote/Users/tfiala/lldb/svn/llvm/tools/lldb/llvm-build/Release+Asserts/x86_64/tools/clang/include -I/Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 -I/Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/DerivedSources/x86_64 -I/Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/DerivedSources -Wreorder -F/Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/PrivateFrameworks -I/System/Library/Frameworks/Python.!<div>
<div class="h5"><br>

<div><div> framework/Versions/2.7/include/python2.7 -fno-rtti -Wglobal-constructors -flimit-debug-info -Wparentheses -DLLDB_USE_BUILTIN_DEMANGLER -MMD -MT dependencies -MF /Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/Objects-normal/x86_64/ArchSpec.d --serialize-diagnostics /Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/Objects-normal/x86_64/ArchSpec.dia -c /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp -o /Users/tfiala/Library/Developer/Xcode/DerivedData/lldb-fdedbkfqiftsgoaeqxdcrpiwguzs/Build/Intermediates/lldb.build/Debug/lldb-core.build/Objects-normal/x86_64/ArchSpec.o<br>


><br>
><br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:79:48: error: no member named 'arm64' in 'llvm::Triple'<br>
><br>
>     { eByteOrderLittle, 8, 4, 4, llvm::Triple::arm64  , ArchSpec::eCore_arm_arm64       , "arm64"     },<br>
><br>
>                                  ~~~~~~~~~~~~~~^<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:184:54: error: no member named 'CPU_TYPE_ARM64' in namespace 'llvm::MachO'; did you mean 'CPU_TYPE_ARM'?<br>
><br>
>     { ArchSpec::eCore_arm_arm64       , llvm::MachO::CPU_TYPE_ARM64     , CPU_ANY, UINT32_MAX , SUBTYPE_MASK },<br>
><br>
>                                         ~~~~~~~~~~~~~^~~~~~~~~~~~~~<br>
><br>
>                                                      CPU_TYPE_ARM<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:20:<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/include/lldb/Utility/SafeMachO.h:111:<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/llvm/include/llvm/Support/MachO.h:914:7: note: 'CPU_TYPE_ARM' declared here<br>
><br>
>       CPU_TYPE_ARM       = 12,<br>
><br>
>       ^<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:185:54: error: no member named 'CPU_TYPE_ARM64' in namespace 'llvm::MachO'; did you mean 'CPU_TYPE_ARM'?<br>
><br>
>     { ArchSpec::eCore_arm_arm64       , llvm::MachO::CPU_TYPE_ARM64     , 0      , UINT32_MAX , SUBTYPE_MASK },<br>
><br>
>                                         ~~~~~~~~~~~~~^~~~~~~~~~~~~~<br>
><br>
>                                                      CPU_TYPE_ARM<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:20:<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/include/lldb/Utility/SafeMachO.h:111:<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/llvm/include/llvm/Support/MachO.h:914:7: note: 'CPU_TYPE_ARM' declared here<br>
><br>
>       CPU_TYPE_ARM       = 12,<br>
><br>
>       ^<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:186:54: error: no member named 'CPU_TYPE_ARM64' in namespace 'llvm::MachO'; did you mean 'CPU_TYPE_ARM'?<br>
><br>
>     { ArchSpec::eCore_arm_arm64       , llvm::MachO::CPU_TYPE_ARM64     , 1      , UINT32_MAX , SUBTYPE_MASK },<br>
><br>
>                                         ~~~~~~~~~~~~~^~~~~~~~~~~~~~<br>
><br>
>                                                      CPU_TYPE_ARM<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:20:<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/include/lldb/Utility/SafeMachO.h:111:<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/llvm/include/llvm/Support/MachO.h:914:7: note: 'CPU_TYPE_ARM' declared here<br>
><br>
>       CPU_TYPE_ARM       = 12,<br>
><br>
>       ^<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:187:54: error: no member named 'CPU_TYPE_ARM64' in namespace 'llvm::MachO'; did you mean 'CPU_TYPE_ARM'?<br>
><br>
>     { ArchSpec::eCore_arm_arm64       , llvm::MachO::CPU_TYPE_ARM64     , 13     , UINT32_MAX , SUBTYPE_MASK },<br>
><br>
>                                         ~~~~~~~~~~~~~^~~~~~~~~~~~~~<br>
><br>
>                                                      CPU_TYPE_ARM<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:20:<br>
><br>
> In file included from /Users/tfiala/lldb/svn/llvm/tools/lldb/include/lldb/Utility/SafeMachO.h:111:<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/llvm/include/llvm/Support/MachO.h:914:7: note: 'CPU_TYPE_ARM' declared here<br>
><br>
>       CPU_TYPE_ARM       = 12,<br>
><br>
>       ^<br>
><br>
> /Users/tfiala/lldb/svn/llvm/tools/lldb/source/Core/ArchSpec.cpp:738:44: error: no member named 'arm64' in 'llvm::Triple'<br>
><br>
>                         case llvm::Triple::arm64:<br>
><br>
>                              ~~~~~~~~~~~~~~^<br>
><br>
> 6 errors generated.<br>
><br>
> I've gone back to start of yesterday and still see it.  I've wiped my DerivedData directories.  Do I have something misconfigured in Xcode or is this a valid build break?<br>
><br>
><br>
><br>
> From my end it looks like the arm64 part should be aarch64 (?), but the other failures around CPU_TYPE_ARM64 was less clear what to do.<br>
><br>
> Thanks!<br>
> --<br>
> -Todd<br>
</div></div><div><div>> _______________________________________________<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>
<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></div></div></blockquote></div><br><br clear="all"><div class=""><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></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">-Todd</div>
</div>