Skip to content

Commit 1bfdab5

Browse files
committed
[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 llvm-svn: 372481
1 parent cd629ea commit 1bfdab5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/include/llvm/DebugInfo/CodeView/CodeViewRegisters.def

+7
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ CV_REGISTER(ARM_NQ15, 415)
489489

490490
#if defined(CV_REGISTERS_ALL) || defined(CV_REGISTERS_ARM64)
491491

492+
// arm64intr.h from MSVC defines ARM64_FPSR, which conflicts with
493+
// these declarations.
494+
#pragma push_macro("ARM64_FPSR")
495+
#undef ARM64_FPSR
496+
492497
// ARM64 registers
493498

494499
CV_REGISTER(ARM64_NOREG, 0)
@@ -677,4 +682,6 @@ CV_REGISTER(ARM64_Q31, 211)
677682

678683
CV_REGISTER(ARM64_FPSR, 220)
679684

685+
#pragma pop_macro("ARM64_FPSR")
686+
680687
#endif // defined(CV_REGISTERS_ALL) || defined(CV_REGISTERS_ARM64)

0 commit comments

Comments
 (0)