<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Enum constants defined in Support/MachO.h conflict with system header"
   href="https://llvm.org/bugs/show_bug.cgi?id=25871">25871</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Enum constants defined in Support/MachO.h conflict with system header
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Support Libraries
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dan@danburkert.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The OS X mach-o/loader.h system header defines a set of constants as macros,
and the LLVM Support/MachO.h header redefines those constants as enum variants
(MH_MAGIC is one example).  The result is that in applications that import both
headers, the enum identifier in Support/MachO.h is replaced with the value, and
compilation fails.

OS X system header:
<a href="https://opensource.apple.com/source/xnu/xnu-1456.1.26/EXTERNAL_HEADERS/mach-o/loader.h">https://opensource.apple.com/source/xnu/xnu-1456.1.26/EXTERNAL_HEADERS/mach-o/loader.h</a>

LLVM header:
<a href="https://github.com/llvm-mirror/llvm/blob/856a0380260e2735f51b059822674bd47961c050/include/llvm/Support/MachO.h#L24-L80">https://github.com/llvm-mirror/llvm/blob/856a0380260e2735f51b059822674bd47961c050/include/llvm/Support/MachO.h#L24-L80</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>