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

Vladislav Dzhidzhoev via All-commits all-commits at lists.llvm.org
Fri Feb 17 06:12:05 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af6c0b6d8c9dc52485d56e82f79a03de09aa188f
      https://github.com/llvm/llvm-project/commit/af6c0b6d8c9dc52485d56e82f79a03de09aa188f
  Author: Vladislav Dzhidzhoev <vdzhidzhoev at accesssoftek.com>
  Date:   2023-02-17 (Fri, 17 Feb 2023)

  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
class/struct 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