mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-06 21:05:51 +00:00
585de7a1b1
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 |
||
---|---|---|
.. | ||
AIXDataTypesFix.h | ||
AlignOf.h | ||
Allocator.h | ||
Atomic.h | ||
BlockFrequency.h | ||
BranchProbability.h | ||
CallSite.h | ||
Capacity.h | ||
Casting.h | ||
CFG.h | ||
circular_raw_ostream.h | ||
CodeGen.h | ||
COFF.h | ||
CommandLine.h | ||
Compiler.h | ||
ConstantFolder.h | ||
ConstantRange.h | ||
CrashRecoveryContext.h | ||
DataExtractor.h | ||
DataFlow.h | ||
DataStream.h | ||
DataTypes.h.cmake | ||
DataTypes.h.in | ||
Debug.h | ||
DebugLoc.h | ||
Disassembler.h | ||
DOTGraphTraits.h | ||
Dwarf.h | ||
DynamicLibrary.h | ||
ELF.h | ||
Endian.h | ||
Errno.h | ||
ErrorHandling.h | ||
FEnv.h | ||
FileSystem.h | ||
FileUtilities.h | ||
Format.h | ||
FormattedStream.h | ||
GCOV.h | ||
GetElementPtrTypeIterator.h | ||
GraphWriter.h | ||
Host.h | ||
IncludeFile.h | ||
InstIterator.h | ||
InstVisitor.h | ||
IntegersSubset.h | ||
IntegersSubsetMapping.h | ||
IRBuilder.h | ||
IRReader.h | ||
LeakDetector.h | ||
LICENSE.TXT | ||
Locale.h | ||
LockFileManager.h | ||
MachO.h | ||
ManagedStatic.h | ||
MathExtras.h | ||
MDBuilder.h | ||
Memory.h | ||
MemoryBuffer.h | ||
MemoryObject.h | ||
Mutex.h | ||
MutexGuard.h | ||
NoFolder.h | ||
OutputBuffer.h | ||
PassNameParser.h | ||
Path.h | ||
PathV1.h | ||
PathV2.h | ||
PatternMatch.h | ||
PluginLoader.h | ||
PointerLikeTypeTraits.h | ||
PredIteratorCache.h | ||
PrettyStackTrace.h | ||
Process.h | ||
Program.h | ||
raw_os_ostream.h | ||
raw_ostream.h | ||
Recycler.h | ||
RecyclingAllocator.h | ||
Regex.h | ||
Registry.h | ||
RegistryParser.h | ||
RWMutex.h | ||
SaveAndRestore.h | ||
Signals.h | ||
SMLoc.h | ||
Solaris.h | ||
SourceMgr.h | ||
StreamableMemoryObject.h | ||
StringPool.h | ||
SwapByteOrder.h | ||
system_error.h | ||
SystemUtils.h | ||
TargetFolder.h | ||
TargetRegistry.h | ||
TargetSelect.h | ||
Threading.h | ||
ThreadLocal.h | ||
Timer.h | ||
TimeValue.h | ||
ToolOutputFile.h | ||
type_traits.h | ||
TypeBuilder.h | ||
Valgrind.h | ||
ValueHandle.h | ||
Win64EH.h | ||
YAMLParser.h |