<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62942>62942</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            arm64intrin.h doesn't forward to MSVC's header when needed
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          TheJCAB
      </td>
    </tr>
</table>

<pre>
    Code reference: https://github.com/llvm/llvm-project/blame/6f026ff029853431ee535e6a361edd059da3ab27/clang/lib/Headers/arm64intr.h#L11

```
/* Only include this if we're compiling for the windows platform. */
#ifndef _MSC_VER
```

I believe this condition is reversed from what it needs to be. It should be `#ifndef` (according to the comment).

I encountered this issue while porting Microsoft's Time Travel Debugging to build with clang-cl (in a push for portability). Our ARM64 code makes use of additional definitions from this header besides the barrier constants, so we got build errors because they were not defined.

I verified that reversing the condition fixes the build errors.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlEuPpDYUhX-N2VwNAvOoYsGipjulTJTWSDOt2Y78uOCbGLtkmyL97yPcVF7KZiRk5AXnfD7HFxEjzQ5xZN1H1j0XYk3Gh_HV4C9Pl4-F9PptfPIaIeCEAZ1C1lzApHSLrLkwfmX8OlMyqyyVXxi_Wnt_vD7cgv8NVWL8Kq1YkPFrP1W8n6aKD-euaZsasWs67EXT16h11Q1aNELyE-NXZYWbdyWSjF9_RqExRMavIix9Sy6F0jDe_FrXrHpm1eVY--p43rc73wU-O_sG5JRdNUIyFIEm2JDxU0BQfrmRJTfD5AMkg7CR036LcLMiTT4sJTCepQ7NhiancYLvL1-fvn_76cv_W-f1E0i0hPfDVnmnKZF3QBEC3jFE1DAFv8BmRAJK4BB1hORBYgmfEkTjV6tBIuzSD2_WV8D4WSjlg97Zk8_oyi8LusT4UP4bA53yq0sYUB8JxLgibIYsws2HtIu8kAo--ikxforwSgvCaxB3tPCMcp3nw0iuZDVslAzkkj4ou8OQAwG3NZoc5K4pJFlKbzsNfF4DXL689C2o_Tot4neMsEYEP4HQ76kICxoncnkT33PJsCa3DxIjaYz5pFKEQBj2SGMSLkXGnyB62BBmnw5GDMGHCBKV2K2SwTfYMCA4n96tUP8nqDsGmiinJNLRUT53TvdR30R_PDj-YVQWemz00AyiwLHuz13VDKe6LszYYCsHMQy8Gmolh66VvBfnaejOvJqUbAsaecWbquNdfW66ui55d1K8Pp10X_UasWVthYsgW-6TVfowF7nBsedDywsrJNr4GOIw5vGT6xxZW1mKKf79WaJkcfxrisiVBrTH6Bg_pb26TQS91_zy9dtTvghH-ptBl68n6mINdvzhn0AG3kc4M_8ZAAD__zO_dWk">