[PATCH] D46613: _Atomic of empty struct shouldn't assert

2018-05-08 Thread JF Bastien via Phabricator via cfe-commits
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

[PATCH] D46613: _Atomic of empty struct shouldn't assert

2018-05-08 Thread John McCall via Phabricator via cfe-commits
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

[PATCH] D46613: _Atomic of empty struct shouldn't assert

2018-05-08 Thread JF Bastien via Phabricator via cfe-commits
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: >

[PATCH] D46613: _Atomic of empty struct shouldn't assert

2018-05-08 Thread JF Bastien via Phabricator via cfe-commits
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/

[PATCH] D46613: _Atomic of empty struct shouldn't assert

2018-05-08 Thread John McCall via Phabricator via cfe-commits
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

[PATCH] D46613: _Atomic of empty struct shouldn't assert

2018-05-08 Thread JF Bastien via Phabricator via cfe-commits
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