Headers: Add ARM support to intrin.h for MSVC compatibility
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 6 Aug 2016 17:58:24 +0000 (17:58 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 6 Aug 2016 17:58:24 +0000 (17:58 +0000)
commitafdef205d88291c1c96b1750f5f413c8a7a87341
treee3a0b9022a55d33cb6bc67a423e62d78aa257696
parenta8e84b9b372868d59362e9f35607ca21930efd1e
Headers: Add ARM support to intrin.h for MSVC compatibility

This fixes compiling with headers from the Windows SDK for ARM, where the
YieldProcessor function (in winnt.h) refers to _ARM_BARRIER_ISHST.

The actual MSVC armintr.h contains a lot more definitions, but this is enough to
build code that uses the Windows SDK but doesn't use ARM intrinsics directly.

An alternative would to just keep the addition to intrin.h (to include
armintr.h), but not actually ship armintr.h, instead having clang's intrin.h
include armintr.h from MSVC's include directory. (That one works fine with
clang, at least for building code that uses the Windows SDK.)

Patch by Martin Storsjö!

llvm-svn: 277928
clang/lib/Headers/CMakeLists.txt
clang/lib/Headers/armintr.h [new file with mode: 0644]
clang/lib/Headers/intrin.h
clang/test/Headers/ms-intrin.cpp