Commit Graph

2 Commits

Author SHA1 Message Date
Xi Ge 1c15202f8a Frontend: Add computeAbstractStructLayout for full struct layout computation
Computes per-field abstract layout (offset, size, alignment, mangled name,
bitwiseCopyable, isOpaque) for structs with both Clang-imported and Swift-native fields.

This API will be used from the library-side to serialize layout information to binary modules.
2026-05-08 14:10:06 -07:00
Xi Ge 5911603ce4 AST: introduce the AbstractTypeLayout struct and computeAbstractLayout()
function that queries Clang's ASTRecordLayout to extract size, alignment,
stride, bitwiseCopyable, and isOpaque for C-backed nominal types.

This also adds a -dump-abstract-layout frontend debugging flag that prints
layout info for Clang-backed stored property types in the primary source
file.
2026-05-06 16:14:13 -07:00