[PATCH] D70923: Fix comment to more accurately describe C++ language requirements around tail padding.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 2 14:44:15 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG711c669ae926: Fix comment to more accurately describe C++ language requirements around tail… (authored by rsmith).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70923/new/
https://reviews.llvm.org/D70923
Files:
clang/include/clang/Basic/TargetCXXABI.h
Index: clang/include/clang/Basic/TargetCXXABI.h
===================================================================
--- clang/include/clang/Basic/TargetCXXABI.h
+++ clang/include/clang/Basic/TargetCXXABI.h
@@ -277,27 +277,18 @@
/// padding of a base class?
///
/// This decision cannot be changed without breaking platform ABI
- /// compatibility, and yet it is tied to language guarantees which
- /// the committee has so far seen fit to strengthen no less than
- /// three separate times:
- /// - originally, there were no restrictions at all;
- /// - C++98 declared that objects could not be allocated in the
- /// tail padding of a POD type;
- /// - C++03 extended the definition of POD to include classes
- /// containing member pointers; and
- /// - C++11 greatly broadened the definition of POD to include
- /// all trivial standard-layout classes.
- /// Each of these changes technically took several existing
- /// platforms and made them permanently non-conformant.
+ /// compatibility. In ISO C++98, tail padding reuse was only permitted for
+ /// non-POD base classes, but that restriction was removed retroactively by
+ /// DR 43, and tail padding reuse is always permitted in all de facto C++
+ /// language modes. However, many platforms use a variant of the old C++98
+ /// rule for compatibility.
enum TailPaddingUseRules {
/// The tail-padding of a base class is always theoretically
- /// available, even if it's POD. This is not strictly conforming
- /// in any language mode.
+ /// available, even if it's POD.
AlwaysUseTailPadding,
/// Only allocate objects in the tail padding of a base class if
/// the base class is not POD according to the rules of C++ TR1.
- /// This is non-strictly conforming in C++11 mode.
UseTailPaddingUnlessPOD03,
/// Only allocate objects in the tail padding of a base class if
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70923.231781.patch
Type: text/x-patch
Size: 1925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191202/913b30a2/attachment-0001.bin>
More information about the cfe-commits
mailing list