[PATCH] D100306: [CodeView] Fix the ARM64 CPUType enum

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 08:12:19 PDT 2021


mstorsjo created this revision.
mstorsjo added reviewers: rnk, efriedma, mgrang, TomTan.
Herald added subscribers: hiraditya, kristof.beyls.
mstorsjo requested review of this revision.
Herald added a project: LLVM.

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.

Not sure what would be an appropriate test for this - anything
involving yaml2obj doesn't do much, as the yaml only encodes the
textual value (while this patch changes what numerical value it is
mapped to).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100306

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


Index: llvm/lib/DebugInfo/CodeView/EnumTables.cpp
===================================================================
--- llvm/lib/DebugInfo/CodeView/EnumTables.cpp
+++ llvm/lib/DebugInfo/CodeView/EnumTables.cpp
@@ -189,7 +189,6 @@
     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 @@
     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),
 };
 
Index: llvm/include/llvm/DebugInfo/CodeView/CodeView.h
===================================================================
--- llvm/include/llvm/DebugInfo/CodeView/CodeView.h
+++ llvm/include/llvm/DebugInfo/CodeView/CodeView.h
@@ -123,7 +123,6 @@
   ARM_XMAC = 0x66,
   ARM_WMMX = 0x67,
   ARM7 = 0x68,
-  ARM64 = 0x69,
   Omni = 0x70,
   Ia64 = 0x80,
   Ia64_2 = 0x81,
@@ -135,6 +134,7 @@
   EBC = 0xe0,
   Thumb = 0xf0,
   ARMNT = 0xf4,
+  ARM64 = 0xf6,
   D3D11_Shader = 0x100,
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100306.336838.patch
Type: text/x-patch
Size: 1234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210412/00073bdb/attachment.bin>


More information about the llvm-commits mailing list