This is an archive of the discontinued LLVM Phabricator instance.

[CodeView] Fix the ARM64 CPUType enum
ClosedPublic

Authored by mstorsjo on Apr 12 2021, 8:12 AM.

Details

Summary

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).

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 12 2021, 8:12 AM
mstorsjo requested review of this revision.Apr 12 2021, 8:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2021, 8:12 AM
TomTan accepted this revision.Apr 12 2021, 8:55 AM

Thanks, LGTM.

This revision is now accepted and ready to land.Apr 12 2021, 8:55 AM
rnk accepted this revision.Apr 12 2021, 9:35 AM

lgtm

llvm/include/llvm/DebugInfo/CodeView/CodeView.h
125–126

I noticed that ARM7 is not in the docs either, but it is present in the cvconst.h header here:
https://github.com/microsoft/microsoft-pdb/blob/master/include/cvconst.h#L374
*shrug*

This revision was automatically updated to reflect the committed changes.