[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header

This fixes (one aspect of) compilation of LLDB with MSVC for ARM64.

LLDB source files include intrin.h, and the MSVC intrin.h transitively
includes arm64intr.h, which has an ARM64_FPSR define, which clashes
with the enum declaration.

Differential Revision: https://reviews.llvm.org/D67864

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372481 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Martin Storsjo 2019-09-21 19:09:24 +00:00
parent 46ff2e05c5
commit 2c6d86209f

View File

@ -489,6 +489,11 @@ CV_REGISTER(ARM_NQ15, 415)
#if defined(CV_REGISTERS_ALL) || defined(CV_REGISTERS_ARM64)
// arm64intr.h from MSVC defines ARM64_FPSR, which conflicts with
// these declarations.
#pragma push_macro("ARM64_FPSR")
#undef ARM64_FPSR
// ARM64 registers
CV_REGISTER(ARM64_NOREG, 0)
@ -677,4 +682,6 @@ CV_REGISTER(ARM64_Q31, 211)
CV_REGISTER(ARM64_FPSR, 220)
#pragma pop_macro("ARM64_FPSR")
#endif // defined(CV_REGISTERS_ALL) || defined(CV_REGISTERS_ARM64)