Skip to content

Commit

Permalink
[CodeView] Add pragma push/pop_macro for ARM64_FPSR to enum header
Browse files Browse the repository at this point in the history
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

llvm-svn: 372481
  • Loading branch information
mstorsjo committed Sep 21, 2019
1 parent cd629ea commit 1bfdab5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions llvm/include/llvm/DebugInfo/CodeView/CodeViewRegisters.def
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

0 comments on commit 1bfdab5

Please sign in to comment.