[all-commits] [llvm/llvm-project] c395a8: [MSP430] Get the DWARF pointer size from MCAsmInfo...
Ilia Kuklin via All-commits
all-commits at lists.llvm.org
Thu May 4 12:38:10 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c395a846001aa953e54916c6f88da22173efb25e
https://github.com/llvm/llvm-project/commit/c395a846001aa953e54916c6f88da22173efb25e
Author: Ilya Kuklin <ikuklin at accesssoftek.com>
Date: 2023-05-04 (Thu, 04 May 2023)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp
M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
M llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
M llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
M llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.cpp
M llvm/test/DebugInfo/MSP430/cu-ranges.ll
M llvm/test/DebugInfo/MSP430/dwarf-basics-v5.ll
M llvm/test/DebugInfo/MSP430/dwarf-basics.ll
M llvm/test/DebugInfo/MSP430/ranges_always.ll
Log Message:
-----------
[MSP430] Get the DWARF pointer size from MCAsmInfo instead of DataLayout.
This change will allow to put code pointers in DWARF info fields that are larger than actual pointer size, e.g. 16-bit pointers into 32-bit fields.
The need for this came up while creating support for MSP430 in LLDB. MSP430-GCC already generates DWARF info with 32-bit fields, so this change is necessary for LLDB to maintain compatibility with both GCC and LLVM binaries. Moreover, right now in LLDB there is no support for having DWARF pointer size different from ELF header type, e.g. 16-bit DWARF info within ELF32, and it seems there is no such thing as ELF16.
Since other mainline targets are made to have the same pointer size in both MCAsmInfo and DataLayout, there is no need to change anything there.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D148042
More information about the All-commits
mailing list