[CodeView] Fix the ARM64 CPUType enum
authorMartin Storsjö <martin@martin.st>
Mon, 12 Apr 2021 11:46:36 +0000 (14:46 +0300)
committerMartin Storsjö <martin@martin.st>
Tue, 13 Apr 2021 09:54:22 +0000 (12:54 +0300)
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

llvm/include/llvm/DebugInfo/CodeView/CodeView.h
llvm/lib/DebugInfo/CodeView/EnumTables.cpp

index c3acb05..5a5d37f 100644 (file)
@@ -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,
 };
 
index 949707b..088ffb7 100644 (file)
@@ -189,7 +189,6 @@ static const EnumEntry<unsigned> 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<unsigned> 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),
 };