[all-commits] [llvm/llvm-project] f89129: Add bit stride to DICompositeType (#131680)
Tom Tromey via All-commits
all-commits at lists.llvm.org
Tue Mar 25 17:14:29 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f89129af8adfda5d9071210b771787e36ae8cd96
https://github.com/llvm/llvm-project/commit/f89129af8adfda5d9071210b771787e36ae8cd96
Author: Tom Tromey <tromey at adacore.com>
Date: 2025-03-25 (Tue, 25 Mar 2025)
Changed paths:
M llvm/docs/LangRef.rst
M llvm/include/llvm/IR/DIBuilder.h
M llvm/include/llvm/IR/DebugInfoMetadata.h
M llvm/lib/AsmParser/LLParser.cpp
M llvm/lib/Bitcode/Reader/MetadataLoader.cpp
M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
M llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
M llvm/lib/IR/AsmWriter.cpp
M llvm/lib/IR/DIBuilder.cpp
M llvm/lib/IR/DebugInfoMetadata.cpp
M llvm/lib/IR/LLVMContextImpl.h
A llvm/test/Bitcode/array-bitstride.ll
M llvm/unittests/IR/DebugInfoTest.cpp
M llvm/unittests/IR/DebugTypeODRUniquingTest.cpp
Log Message:
-----------
Add bit stride to DICompositeType (#131680)
In Ada, an array can be packed and the elements can take less space than
their natural object size. For example, for this type:
type Packed_Array is array (4 .. 8) of Boolean;
pragma pack (Packed_Array);
... each element of the array occupies a single bit, even though the
"natural" size for a Boolean in memory is a byte.
In DWARF, this is represented by putting a DW_AT_bit_stride onto the
array type itself.
This patch adds a bit stride to DICompositeType so that gnat-llvm can
emit DWARF for these sorts of arrays.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list