From 07ed27e2356327c274a7c64ad56f30617992a45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 12 Apr 2021 14:46:36 +0300 Subject: [PATCH] [CodeView] Fix the ARM64 CPUType enum The old, incorrect one seems to have been added in d41ac895bb810d0b15844773cbecbf394d914010, with a similarly placed entry added in EnumTables.cpp in eb4d6142dcd53d79d8f8a86908a035582965fc52. This matches the value documented at https://docs.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/cv-cpu-type-e?view=vs-2019. This fixes running obj2yaml on an object file generated by MSVC. Differential Revision: https://reviews.llvm.org/D100306 --- include/llvm/DebugInfo/CodeView/CodeView.h | 2 +- lib/DebugInfo/CodeView/EnumTables.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/llvm/DebugInfo/CodeView/CodeView.h b/include/llvm/DebugInfo/CodeView/CodeView.h index c3acb05ea8b..5a5d37fc404 100644 --- a/include/llvm/DebugInfo/CodeView/CodeView.h +++ b/include/llvm/DebugInfo/CodeView/CodeView.h @@ -123,7 +123,6 @@ enum class CPUType : uint16_t { ARM_XMAC = 0x66, ARM_WMMX = 0x67, ARM7 = 0x68, - ARM64 = 0x69, Omni = 0x70, Ia64 = 0x80, Ia64_2 = 0x81, @@ -135,6 +134,7 @@ enum class CPUType : uint16_t { EBC = 0xe0, Thumb = 0xf0, ARMNT = 0xf4, + ARM64 = 0xf6, D3D11_Shader = 0x100, }; diff --git a/lib/DebugInfo/CodeView/EnumTables.cpp b/lib/DebugInfo/CodeView/EnumTables.cpp index 949707bf547..088ffb74bb5 100644 --- a/lib/DebugInfo/CodeView/EnumTables.cpp +++ b/lib/DebugInfo/CodeView/EnumTables.cpp @@ -189,7 +189,6 @@ static const EnumEntry CPUTypeNames[] = { CV_ENUM_CLASS_ENT(CPUType, ARM_XMAC), CV_ENUM_CLASS_ENT(CPUType, ARM_WMMX), CV_ENUM_CLASS_ENT(CPUType, ARM7), - CV_ENUM_CLASS_ENT(CPUType, ARM64), CV_ENUM_CLASS_ENT(CPUType, Omni), CV_ENUM_CLASS_ENT(CPUType, Ia64), CV_ENUM_CLASS_ENT(CPUType, Ia64_2), @@ -201,6 +200,7 @@ static const EnumEntry CPUTypeNames[] = { CV_ENUM_CLASS_ENT(CPUType, EBC), CV_ENUM_CLASS_ENT(CPUType, Thumb), CV_ENUM_CLASS_ENT(CPUType, ARMNT), + CV_ENUM_CLASS_ENT(CPUType, ARM64), CV_ENUM_CLASS_ENT(CPUType, D3D11_Shader), };