History log of /external/llvm/unittests/Support/AlignOfTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3c6f89aa2e489b79f16270dae42d10059234cf82 31-Dec-2012 Michael J. Spencer <bigcheesegs@gmail.com> [AlignOf] Add AlignedCharArray and refactor AlignedCharArrayUnion.

This adds AlignedCharArray<Alignment, Size>. A templated struct that contains
a member named buffer of type char[Size] that is aligned to Alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
5a88dda4be791426ab4d20a6a6c9c65d66614a27 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort the #include lines for unittest/...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
0f5720f85b10fb160e24828c22de42ea1cfb5fde 17-Nov-2012 Joe Abbey <jabbey@arxan.com> Removing utf-8 smart quote and trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
e68d7437535b85a840b0958a4ff2d98210e399f4 17-Nov-2012 Joe Abbey <jabbey@arxan.com> Suppressing the 'direct base ‘{anonymous}::S1’ inaccessible in ‘{anonymous}::D9’
due to ambiguity' warning.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
23280ffb90dd7107f866977e8444370590b84b15 10-Nov-2012 Benjamin Kramer <benny.kra@googlemail.com> Provide definitions for all functions.

ICC refuses to compile a class in an anonymous namespace if some functions
aren't defined. Fixes PR13477.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
48b6a79b2d367ea2e8cf014d8af9d573889d2f7f 15-Sep-2012 David Blaikie <dblaikie@gmail.com> Fix up erroneous alignas usage while making this portable to GCC 4.7

Review by Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
cbeb8d9869aafec3c2c1ee0922f0a4d5bb4a916a 17-Aug-2012 Chandler Carruth <chandlerc@gmail.com> Flatten the aligned-char-array utility template to be a directly
templated union at the request of Richard Smith. This makes it
substantially easier to type. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
bd9060c5c028486d1af59edd5ba5bd1217e6af8e 21-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Add a pragma to supress an MSVC warning on some of the absurd code I'm
using to test the alignment support library.

Patch from Nikola on IRC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
3967f503f4ea623d3300a785f5f1c333230f24a9 17-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Disable a particular assertion on MSVC... I'm deeply disturbed by its
implementation of the class layout for the V8 type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
f445be8958014c85eb39e07b1e0a389ea9522230 17-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Add some somewhat exhaustive tests of sizeof properties of this horrible
construct just for my sanity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
fd2b40efd7687621a7c849556a089ce4a610aafd 16-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Relax one assertion -- long double has strange alignments on lots of
platforms.

Also, remove one assertion on MSVC because it produces a completely
preposterous result, claiming something needs 12-byte alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
9755cd600f7a1bbdc080bbfcbd2529a54e1b3aab 16-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Try to reduce the size of the array used for compile-time testing by
making the bounds all '1', and chunking it a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp
585de7a1b1a51fa29b53bbc8faf3cc07e43bd993 16-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Add support to the alignment support header for conjuring a character
array of a suitable size and alignment for any of a number of different
types to be stored into the character array.

The mechanisms for producing an explicitly aligned type are fairly
complex because this operation is poorly supported on all compilers.
We've spent a fairly significant amount of time experimenting with
different implementations inside of Google, and the one using explicitly
expanded templates has been the most robust.

Credit goes to Nick Lewycky for writing the first 20 versions or so of
this logic we had inside of Google. I based this on the only one to
actually survive. In case anyone is worried, yes we are both explicitly
re-contributing and re-licensing it for LLVM. =]

Once the issues with actually specifying the alignment are finished, it
turns out that most compilers don't in turn align anything the way they
are instructed. Testing of this logic against both Clang and GCC
indicate that the alignment constraints are largely ignored by both
compilers! I've come up with and used a work-around by wrapping each
alignment-hinted type directly in a struct, and using that struct to
align the character array through a union. This elaborate hackery is
terrifying, but I've included testing that caught a terrifying number of
bugs in every other technique I've tried.

All of this in order to implement a poor C++98 programmers emulation of
C++11 unrestricted unions in classes such as SmallDenseMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/unittests/Support/AlignOfTest.cpp