History log of /external/llvm/include/llvm/Support/AlignOf.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b1349fa3c52f328896a4182a8e7b90bce75f1e1e 09-Jan-2013 Manuel Klimek <klimek@google.com> Incrase the number of parameters for AlignedCharArrayUnion.

We need this to correctly fix ASTMatchers/ASTTypeTraits.h in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
02d75477cd9bed5acf46979869f041e7f9726200 31-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Remove the declspecs from small alignments that we can force with
a union. These don't actually work for by-value function arguments, and
MSVC warns if they exist even while (we hope) it aligns the argument
correctly due to the other union member.

This means MSVC will miss out on optimizations based on the alignment of
the buffer, but really, there aren't that many for x86 and MSVC is
likely not doing a great job of optimizing LLVM and Clang anyways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
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/include/llvm/Support/AlignOf.h
52d053238aabff0ed7ed0213cb192ce6adf7a190 31-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> xlc supports __attribute__((aligned(x))), use it.
Patch by Kai.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
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/include/llvm/Support/AlignOf.h
be06428ba3d954662b58d204486771c71c816b94 24-Aug-2012 Chandler Carruth <chandlerc@gmail.com> Try to appease MSVC even more elaborately in the alignment hacking space.

MSVC doesn't support passing by-value parameters with alignment of
16-bytes or higher apparantly. What is deeply confusing is that it seems
to *sometimes* (but not always) apply this to any type whose alignment
is set using __declspec(align(...)). This caused lots of errors when we switch
SmallVector over to use the automatically aligned character array
utilities as they used __declspec(align(...)) heavily.

As a pretty horrible but effective work-around, we instead cherry pick
the smallest alignment sizes with specific types that happen to have the
correct alignment, and then fall back to the attribute solution past
them. This should resolve the MSVC build errors folks have been hitting.
Sorry for that. In good news, it will do this without introducing other
UB I hope. =]

Thanks to Timur Iskhodzhanov for helping me test this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
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/include/llvm/Support/AlignOf.h
6656afb31a517944accc52a364fb5d1b98bffb4f 25-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Just remove generic support for C++11 alignas -- GCC is already
advertising complete support w/o alignas implemented, and its
implementation of alignas in the latest versions is so convoluted as to
be unusable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
305b515c2787f47adecbe120e4b4bef55c5e5525 20-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Remove 'static' from inline functions defined in header files.

There is a pretty staggering amount of this in LLVM's header files, this
is not all of the instances I'm afraid. These include all of the
functions that (in my build) are used by a non-static inline (or
external) function. Specifically, these issues were caught by the new
'-Winternal-linkage-in-inline' warning.

I'll try to just clean up the remainder of the clearly redundant "static
inline" cases on functions (not methods!) defined within headers if
I can do so in a reliable way.

There were even several cases of a missing 'inline' altogether, or my
personal favorite "static bool inline". Go figure. ;]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
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/include/llvm/Support/AlignOf.h
6511988cd477db280c7e1057af81025a40039811 07-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix spelling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
16c3b647eb100fe404ee65f106d563ddef6c74b7 30-Oct-2010 Chris Lattner <sabre@nondot.org> Rename alignof -> alignOf to avoid irritating C++'0x compilers,
PR8423, patch by nobled.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
fe2cce63aa26d0916fa7be32c6bf7fa8fb059ee7 20-Feb-2009 Misha Brukman <brukman+llvm@gmail.com> Removed trailing whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
34cd4a484e532cc463fd5a4bf59b88d13c5467c1 05-May-2008 Evan Cheng <evan.cheng@apple.com> Fix more -Wshorten-64-to-32 warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
9d695d5f7d31e912a2be74229b3e2baab2564820 28-Apr-2008 Ted Kremenek <kremenek@apple.com> Add more alignment enums.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
1f801fa5ada9cb40fb97ae755c282e91af54a1bc 11-Feb-2008 Ted Kremenek <kremenek@apple.com> Added "Profile" method to APFloat for use with FoldingSet.

Added member template "Add" to FoldingSetNodeID that allows "adding" arbitrary
objects to a profile via dispatch to FoldingSetTrait<T>::Profile().

Removed FoldingSetNodeID::AddAPFloat and FoldingSetNodeID::APInt, as their
functionality is now replaced using the above mentioned member template.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
7ed47a13356daed2a34cd2209a31f92552e3bdd8 29-Dec-2007 Chris Lattner <sabre@nondot.org> Don't attribute in file headers anymore. See llvmdev for the
discussion of this change. Boy are my fingers tired. ;-)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
129d7d3bde306d186df552694eb511f5fe8bda6b 18-Oct-2007 Ted Kremenek <kremenek@apple.com> Removed inclusion of cassert, which is no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
87f3870db9d92eca87e2f42c3537efe4bfb6e9c2 18-Oct-2007 Ted Kremenek <kremenek@apple.com> Added template function alignof() which provides a clean
function-based interface to getting the alignment of a type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h
a4d9869cf291e6f87bf9e7adfcd9a2c4e4518172 17-Oct-2007 Ted Kremenek <kremenek@apple.com> Added llvm::AlignOf, a template class whose purpose is to portably
compute the minimum memory alignment of arbitrary types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Support/AlignOf.h