This revision was automatically updated to reflect the committed changes.
jfb marked an inline comment as done.
Closed by commit rC331845: _Atomic of empty struct shouldn't assert
(authored by jfb, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46613?vs=145858&id=145859#toc
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
LGTM.
Repository:
rC Clang
https://reviews.llvm.org/D46613
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/c
jfb marked an inline comment as done.
jfb added inline comments.
Comment at: lib/AST/ASTContext.cpp:1965
+ Width = Target->getCharWidth();
+ Align = Target->getCharWidth();
+} else if (Width <= Target->getMaxAtomicPromoteWidth()) {
rjmccall wrote:
>
jfb updated this revision to Diff 145858.
jfb added a comment.
- Assert on zero alignment, instead of making it always byte-aligned.
Repository:
rC Clang
https://reviews.llvm.org/D46613
Files:
lib/AST/ASTContext.cpp
test/CodeGen/c11atomics-ios.c
test/CodeGen/c11atomics.c
Index: test/
rjmccall added inline comments.
Comment at: lib/AST/ASTContext.cpp:1965
+ Width = Target->getCharWidth();
+ Align = Target->getCharWidth();
+} else if (Width <= Target->getMaxAtomicPromoteWidth()) {
Alignment, unlike size, is definitely never 0. I
jfb created this revision.
jfb added reviewers: arphaman, rjmccall.
Herald added subscribers: cfe-commits, aheejin.
An _Atomic of an empty struct is pretty silly. In general we just widen empty
structs to hold a byte's worth of storage, and we represent size and alignment
as 0 internally and let