summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML
diff options
context:
space:
mode:
authorTom Tan <Tom.Tan@microsoft.com>2019-05-31 23:43:31 +0000
committerTom Tan <Tom.Tan@microsoft.com>2019-05-31 23:43:31 +0000
commiteb4d6142dcd53d79d8f8a86908a035582965fc52 (patch)
tree0355e87c79ad256fda3432db2d2dbe59517525e7 /llvm/lib/ObjectYAML
parentec1982f07f5bdc60a0e982b992c7143cb879a996 (diff)
downloadbcm5719-llvm-eb4d6142dcd53d79d8f8a86908a035582965fc52.tar.gz
bcm5719-llvm-eb4d6142dcd53d79d8f8a86908a035582965fc52.zip
[COFF, ARM64] Add CodeView register mapping
CodeView has its own register map which is defined in cvconst.h. Missing this mapping before saving register to CodeView causes debugger to show incorrect value for all register based variables, like variables in register and local variables addressed by register (stack pointer + offset). This change added mapping between LLVM register and CodeView register so the correct register number will be stored to CodeView/PDB, it aso fixed the mapping from CodeView register number to register name based on current CPUType but print PDB to yaml still assumes X86 CPU and needs to be fixed. Differential Revision: https://reviews.llvm.org/D62608 llvm-svn: 362280
Diffstat (limited to 'llvm/lib/ObjectYAML')
-rw-r--r--llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
index bbaa5ed75ad..227107c051d 100644
--- a/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
+++ b/llvm/lib/ObjectYAML/CodeViewYAMLSymbols.cpp
@@ -147,7 +147,7 @@ void ScalarEnumerationTraits<CPUType>::enumeration(IO &io, CPUType &Cpu) {
}
void ScalarEnumerationTraits<RegisterId>::enumeration(IO &io, RegisterId &Reg) {
- auto RegNames = getRegisterNames();
+ auto RegNames = getRegisterNames(CPUType::X64);
for (const auto &E : RegNames) {
io.enumCase(Reg, E.Name.str().c_str(), static_cast<RegisterId>(E.Value));
}
OpenPOWER on IntegriCloud