This is an archive of the discontinued LLVM Phabricator instance.

[llvm] [CodeView] Move Triple::ArchType → CPUType mapping from LLDB
Needs ReviewPublic

Authored by mgorny on Jun 3 2019, 7:45 AM.

Details

Summary

Since neither the CodeView::CPUType nor Triple::ArchType constants are
specific to LLDB, it makes no sense to maintain their mapping there.
Instead, introduce a small inline function to provide the mapping
in CodeView, and provide a convenience overload of getRegisterNames().

Diff Detail

Event Timeline

mgorny created this revision.Jun 3 2019, 7:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 3 2019, 7:45 AM
compnerd added inline comments.Jun 3 2019, 9:58 AM
llvm/include/llvm/DebugInfo/CodeView/CodeView.h
145

I that aarch64_be and aarch64_32 should be included in this.

147

This is still wrong. x86 and armv7 are totally legitimate values. Furthermore, x86 is still far more prevalent on Windows.

mgorny marked 2 inline comments as done.Jun 4 2019, 10:25 AM
mgorny added inline comments.
llvm/include/llvm/DebugInfo/CodeView/CodeView.h
147

Could you be more specific, please? Are you asking me to cover more input values?

Which option do you suggest mapping x86 into? Pentium3?

mtrent added a reviewer: friss.Jun 6 2019, 2:47 PM

I am not familiar with lldb or with the DebugView library, so I am pulling in Fred Riss for this review. Thanks!

mtrent resigned from this revision.Jun 6 2019, 2:47 PM