Skip to content

Commit 0a3bfff

Browse files
mstorsjocompnerd
authored andcommitted
[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 (cherry picked from commit 1bfdab5)
1 parent 8bb523c commit 0a3bfff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ CV_REGISTER(AMD64_K7, 765)
368368

369369
#if defined(CV_REGISTERS_ALL) || defined(CV_REGISTERS_ARM64)
370370

371+
// arm64intr.h from MSVC defines ARM64_FPSR, which conflicts with
372+
// these declarations.
373+
#pragma push_macro("ARM64_FPSR")
374+
#undef ARM64_FPSR
375+
371376
// ARM64 registers
372377

373378
CV_REGISTER(ARM64_NOREG, 0)
@@ -556,4 +561,6 @@ CV_REGISTER(ARM64_Q31, 211)
556561

557562
CV_REGISTER(ARM64_FPSR, 220)
558563

564+
#pragma pop_macro("ARM64_FPSR")
565+
559566
#endif // defined(CV_REGISTERS_ALL) || defined(CV_REGISTERS_ARM64)

0 commit comments

Comments
 (0)