This revision was automatically updated to reflect the committed changes.
Closed by commit rL277368: libc++: test lock-free atomic alignment (authored by
jfb).
Changed prior to commit:
https://reviews.llvm.org/D22073?vs=66342&id=66356#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22073
jfb added a comment.
In https://reviews.llvm.org/D22073#486636, @EricWF wrote:
> OK, IMO the way to handle this test is to have it manually link `-latomic`.
> This can be done by renaming the test to `.sh.cpp` and adding the
> following lines:
>
> // REQUIRES: libatomic
> // RUN: %build -la
jfb updated this revision to Diff 66342.
jfb added a comment.
- Move atomics.align to libcxx-specific
- Give names to anonymous structs
- Rename test, use REQUIRES / RUN commands
https://reviews.llvm.org/D22073
Files:
test/libcxx/atomics/atomics.align/align.pass.sh.cpp
Index: test/libcxx/ato
EricWF added a comment.
OK, IMO the way to handle this test is to have it manually link `-latomic`.
This can be done by renaming the test to `.sh.cpp` and adding the
following lines:
// REQUIRES: libatomic
// RUN: %build -latomic
// RUN: %run
After that this LGTM.
https://reviews.llvm.
EricWF added a comment.
In https://reviews.llvm.org/D22073#482120, @jfb wrote:
> In https://reviews.llvm.org/D22073#481402, @EricWF wrote:
>
> > - The test should be moved to `test/libcxx/atomics/atomics.align` since
> > it's libc++ specific.
>
>
> Done.
>
> > - Please give the anonymous struct
jfb added a comment.
In http://reviews.llvm.org/D22073#481402, @EricWF wrote:
> - The test should be moved to `test/libcxx/atomics/atomics.align` since it's
> libc++ specific.
Done.
> - Please give the anonymous struct declarations unique names. `T1`, `T2`,
> ..., `TN` is fine. Currently the
jfb updated this revision to Diff 63723.
jfb added a comment.
- Move atomics.align to libcxx-specific
- Give names to anonymous structs
http://reviews.llvm.org/D22073
Files:
test/libcxx/atomics/atomics.align/align.pass.cpp
Index: test/libcxx/atomics/atomics.align/align.pass.cpp
=
EricWF added a comment.
- The test should be moved to `test/libcxx/atomics/atomics.align` since it's
libc++ specific.
- Please give the anonymous struct declarations unique names. `T1`, `T2`, ...,
`TN` is fine. Currently they all mangle to `main::type` in diagnostic output.
- The test fails to l
jfb created this revision.
jfb added a reviewer: cfe-commits.
libc++ implements std::atomic<_Tp> using __atomic_base<_Tp> with
`mutable _Atomic(_Tp) __a_`. That member must be suitably aligned on
relevant ISAs for instructions such as cmpxchg to work properly, but
this alignment isn't checked anyw