mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[COFF, ARM64] Fix CodeView API change for getRegisterNames
Change rL362280 changed CodeView API getRegisterNames() by adding an input parameter in CPUType. It is called in LLDB and needs to be updated. Differential Revision: https://reviews.llvm.org/D62772 llvm-svn: 362349
This commit is contained in:
@@ -25,8 +25,19 @@ using namespace lldb_private::postfix;
|
||||
|
||||
static uint32_t ResolveLLDBRegisterNum(llvm::StringRef reg_name, llvm::Triple::ArchType arch_type) {
|
||||
// lookup register name to get lldb register number
|
||||
llvm::codeview::CPUType cpu_type;
|
||||
switch (arch_type) {
|
||||
case llvm::Triple::ArchType::aarch64:
|
||||
cpu_type = llvm::codeview::CPUType::ARM64;
|
||||
break;
|
||||
|
||||
default:
|
||||
cpu_type = llvm::codeview::CPUType::X64;
|
||||
break;
|
||||
}
|
||||
|
||||
llvm::ArrayRef<llvm::EnumEntry<uint16_t>> register_names =
|
||||
llvm::codeview::getRegisterNames();
|
||||
llvm::codeview::getRegisterNames(cpu_type);
|
||||
auto it = llvm::find_if(
|
||||
register_names,
|
||||
[®_name](const llvm::EnumEntry<uint16_t> ®ister_entry) {
|
||||
|
||||
Reference in New Issue
Block a user