[PATCH] D49871: Improve support of PDB as an external layout source
Aleksandr Urakov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 26 12:16:12 PDT 2018
aleksandr.urakov created this revision.
aleksandr.urakov added reviewers: rsmith, zturner, rnk, mstorsjo, majnemer.
aleksandr.urakov added a project: clang.
This patch improves support of PDB as an external layout source in the next cases:
- Multiple non-virtual inheritance from packed base classes. When using external layout, there's no need to align `NonVirtualSize` of a base class. It may cause an overlapping when the next base classes will be layouted (but there is a slightly different case in the test because I can't find a way to specify a base offset);
- Support of nameless structs and unions. There is no info about nameless child structs and unions in Microsoft cl-emitted PDBs. Instead all its fields are just treated as outer structure's (union's) fields. This also causes a fields overlapping, and makes it possible for unions to have fields located at a non-zero offset.
Repository:
rC Clang
https://reviews.llvm.org/D49871
Files:
lib/AST/RecordLayoutBuilder.cpp
test/CodeGenCXX/Inputs/override-layout-nameless-struct-union.layout
test/CodeGenCXX/Inputs/override-layout-packed-base.layout
test/CodeGenCXX/override-layout-nameless-struct-union.cpp
test/CodeGenCXX/override-layout-packed-base.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49871.157531.patch
Type: text/x-patch
Size: 5525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180726/c69f2c5c/attachment.bin>
More information about the cfe-commits
mailing list