aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2020-07-10 13:52:47 +0200
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2020-07-10 14:01:05 +0200
commit4c5a93bd58bad70e91ac525b0e020bd5119a321a (patch)
tree1bb50a1e242dd2e8ea0744b0b6b0dabcd862ab45 /clang/lib/Frontend/CompilerInvocation.cpp
parentb69e0f674fb5a05224fbe50cae9a9e4137a2c0e1 (diff)
downloadllvm-4c5a93bd58bad70e91ac525b0e020bd5119a321a.zip
llvm-4c5a93bd58bad70e91ac525b0e020bd5119a321a.tar.gz
llvm-4c5a93bd58bad70e91ac525b0e020bd5119a321a.tar.bz2
[ABI] Handle C++20 [[no_unique_address]] attribute
Many platform ABIs have special support for passing aggregates that either just contain a single member of floatint-point type, or else a homogeneous set of members of the same floating-point type. When making this determination, any extra "empty" members of the aggregate type will typically be ignored. However, in C++ (at least in all prior versions), no data member would actually count as empty, even if it's type is an empty record -- it would still be considered to take up at least one byte of space, and therefore make those ABI special cases not apply. This is now changing in C++20, which introduced the [[no_unique_address]] attribute. Members of empty record type, if they also carry this attribute, now do *not* take up any space in the type, and therefore the ABI special cases for single-element or homogeneous aggregates should apply. The C++ Itanium ABI has been updated accordingly, and GCC 10 has added support for this new case. This patch now adds support to LLVM. This is cross-platform; it affects all platforms that use the single-element or homogeneous aggregate ABI special case and implement this using any of the following common subroutines in lib/CodeGen/TargetInfo.cpp: isEmptyField isEmptyRecord isSingleElementStruct isHomogeneousAggregate
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions