llvm-6502/include/llvm/Support
Chandler Carruth 585de7a1b1 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
2012-06-16 08:52:57 +00:00
..
AIXDataTypesFix.h
AlignOf.h Add support to the alignment support header for conjuring a character 2012-06-16 08:52:57 +00:00
Allocator.h
Atomic.h
BlockFrequency.h
BranchProbability.h
CallSite.h
Capacity.h
Casting.h
CFG.h Calls and invokes with the new clang.arc.no_objc_arc_exceptions 2012-02-17 18:59:53 +00:00
circular_raw_ostream.h
CodeGen.h Move the TLSModel information into the TargetMachine rather than hiding 2012-04-08 17:20:55 +00:00
COFF.h [Support/COFF] Make the order of members in symbol match the standard. 2012-05-14 22:43:21 +00:00
CommandLine.h fix warnings when compiling with -Wshadow 2012-05-18 18:39:06 +00:00
Compiler.h Fix trivial typo in llvm_move. 2012-05-07 06:00:23 +00:00
ConstantFolder.h
ConstantRange.h
CrashRecoveryContext.h
DataExtractor.h
DataFlow.h
DataStream.h Fix comment-rulers. 2012-02-06 22:41:47 +00:00
DataTypes.h.cmake Fix warnings when building with VS11. 2012-03-11 01:20:23 +00:00
DataTypes.h.in
Debug.h Tidy up. Whitespace. 2012-03-28 22:34:41 +00:00
DebugLoc.h
Disassembler.h
DOTGraphTraits.h
Dwarf.h Lowercase the tag name to match the rest of dwarf. 2012-03-29 21:35:05 +00:00
DynamicLibrary.h
ELF.h [Hexagon] Clean up Hexagon ELF definition. 2012-05-17 16:46:46 +00:00
Endian.h
Errno.h
ErrorHandling.h
FEnv.h
FileSystem.h [Support] Add a version of sys::fs::equivalent() that treats errors as false. 2012-05-15 22:07:14 +00:00
FileUtilities.h
Format.h
FormattedStream.h
GCOV.h
GetElementPtrTypeIterator.h
GraphWriter.h
Host.h
IncludeFile.h
InstIterator.h
InstVisitor.h Add support to the InstVisitor for visiting a generic callsite. The 2012-03-31 11:31:24 +00:00
IntegersSubset.h IntegersSubsetMapping: 2012-06-05 07:43:08 +00:00
IntegersSubsetMapping.h IntegersSubsetMapping: added exclude operation, that allows to exclude subset of integers from current mapping. 2012-06-05 07:57:36 +00:00
IRBuilder.h Make it possible to indicate relaxed floating point requirements at the IR level 2012-04-16 16:28:59 +00:00
IRReader.h
LeakDetector.h
LICENSE.TXT
Locale.h platform support for counting column widths and checking isprint 2012-04-17 20:03:03 +00:00
LockFileManager.h Move Clang's file-level locking facility over to LLVM's support 2012-01-29 20:15:10 +00:00
MachO.h Add new load commands for MachO. 2012-03-06 19:54:44 +00:00
ManagedStatic.h
MathExtras.h
MDBuilder.h Add support for branch weight metadata to MDBuilder and use it in various places. 2012-05-26 13:59:43 +00:00
Memory.h
MemoryBuffer.h
MemoryObject.h Make MemoryObject accessor members const again 2012-02-29 01:09:06 +00:00
Mutex.h
MutexGuard.h
NoFolder.h
OutputBuffer.h
PassNameParser.h
Path.h
PathV1.h
PathV2.h Convert comments to proper Doxygen comments. 2012-06-09 00:01:45 +00:00
PatternMatch.h Revert commit 149912 (lattner) and add a testcase that shows the problem (which 2012-02-10 14:26:42 +00:00
PluginLoader.h
PointerLikeTypeTraits.h
PredIteratorCache.h
PrettyStackTrace.h
Process.h [Support] Add sys::Process::GetRandomNumber(). 2012-05-05 16:36:20 +00:00
Program.h
raw_os_ostream.h
raw_ostream.h Reapply 'Add reverseColor to raw_ostream'. 2012-04-16 08:56:50 +00:00
Recycler.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
RecyclingAllocator.h
Regex.h
Registry.h
RegistryParser.h
RWMutex.h
SaveAndRestore.h Move include/llvm/ADT/SaveAndRestore.h -> include/llvm/Support/SaveAndRestore.h 2012-03-01 19:45:47 +00:00
Signals.h
SMLoc.h fix warnings when compiling with -Wshadow 2012-05-18 18:39:06 +00:00
Solaris.h
SourceMgr.h fix warnings when compiling with -Wshadow 2012-05-18 18:39:06 +00:00
StreamableMemoryObject.h Make MemoryObject accessor members const again 2012-02-29 01:09:06 +00:00
StringPool.h
SwapByteOrder.h
system_error.h Rewrite LLVM's generalized support library for hashing to follow the API 2012-03-01 18:55:25 +00:00
SystemUtils.h
TargetFolder.h
TargetRegistry.h Allow MCCodeEmitter access to the target MCRegisterInfo. 2012-05-15 17:35:52 +00:00
TargetSelect.h Add InitializeNativeTargetDisassembler function. 2012-03-26 21:56:56 +00:00
Threading.h
ThreadLocal.h Remove use of GNU extension to resolve Clang warning. 2012-06-12 17:06:32 +00:00
Timer.h
TimeValue.h
ToolOutputFile.h
type_traits.h If the __is_trivially_copyable type trait is available use it as the baseline for isPodLike. 2012-04-28 16:22:31 +00:00
TypeBuilder.h
Valgrind.h
ValueHandle.h Move CallbackVHs dtor inline, it can be devirtualized in many cases. Move the other virtual methods out of line as they are only called from within Value.cpp anyway. 2012-05-19 19:15:25 +00:00
Win64EH.h
YAMLParser.h Convert comments to proper Doxygen comments. 2012-06-09 00:01:45 +00:00