[all-commits] [llvm/llvm-project] 731abd: [clang][CodeGen] Use base subobject type layout fo...

Vladislav Dzhidzhoev via All-commits all-commits at lists.llvm.org
Thu Dec 15 04:12:38 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 731abdfdcc33d813e6c3b4b89eff307aa5c18083
  Author: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
  Date:   2022-12-15 (Thu, 15 Dec 2022)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/RecordLayoutBuilder.cpp
    M clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
    A clang/test/CodeGenCXX/no-unique-address-3.cpp

  Log Message:
  [clang][CodeGen] Use base subobject type layout for potentially-overlapping fields

RecordLayoutBuilder assumes the size of a potentially-overlapping field
with non-zero size as the size of the base subobject type corresponding
to the field type.
Make CGRecordLayoutBuilder to acknowledge that in order to avoid incorrect
padding insertion.

Differential Revision: https://reviews.llvm.org/D139741

More information about the All-commits mailing list