[all-commits] [llvm/llvm-project] 4cc791: [Clang] Add __datasizeof (#67805)

philnik777 via All-commits all-commits at lists.llvm.org
Mon Nov 13 02:00:20 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4cc791bc98e075879f8c379f17e0b0369d57a40d
      https://github.com/llvm/llvm-project/commit/4cc791bc98e075879f8c379f17e0b0369d57a40d
  Author: philnik777 <nikolasklauser at berlin.de>
  Date:   2023-11-13 (Mon, 13 Nov 2023)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/Features.def
    M clang/include/clang/Basic/TokenKinds.def
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Sema/SemaExpr.cpp
    A clang/test/CodeGenCXX/datasizeof.cpp
    A clang/test/SemaCXX/datasizeof.cpp

  Log Message:
  -----------
  [Clang] Add __datasizeof (#67805)

The data size is required for implementing the `memmove` optimization
for `std::copy`, `std::move` etc. correctly as well as replacing
`__compressed_pair` with `[[no_unique_address]]` in libc++. Since the
compiler already knows the data size, we can avoid some complexity by
exposing that information.




More information about the All-commits mailing list