Page MenuHomePhabricator

[debug-info] Emit DW_AT_byte_size for non-default pointer/reference types

Authored by arichardson on Mar 26 2021, 4:10 AM.
This is a draft revision that has not yet been submitted for review.



In the CHERI and Arm Morello targets we support a compilation mode that
has multiple pointer sizes (32/64-bit integers as well as capabilities that are
twice that size). In order to support this in the debugger we emit
DW_AT_byte_size for pointer and reference types if their size is different
from the target's pointer size for the alloca address space.

This patch found the pointer size mismatch that I fixed in D99410.

Diff Detail

Unit TestsFailed

40 msx64 debian > LLVM.DebugInfo/Generic::ptrsize-nonstandard.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/llc -O0 -filetype=obj < /mnt/disks/ssd0/agent/llvm-project/llvm/test/DebugInfo/Generic/ptrsize-nonstandard.ll > /mnt/disks/ssd0/agent/llvm-project/build/test/DebugInfo/Generic/Output/ptrsize-nonstandard.ll.tmp
30 msx64 windows > LLVM.DebugInfo/Generic::ptrsize-nonstandard.ll
Script: -- : 'RUN: at line 1'; c:\ws\w16c2-1\llvm-project\premerge-checks\build\bin\llc.exe -mtriple=x86_64-pc-windows-gnu -O0 -filetype=obj < C:\ws\w16c2-1\llvm-project\premerge-checks\llvm\test\DebugInfo\Generic\ptrsize-nonstandard.ll > C:\ws\w16c2-1\llvm-project\premerge-checks\build\test\DebugInfo\Generic\Output\ptrsize-nonstandard.ll.tmp