llvm-6502/include/llvm/Support
Chandler Carruth 4d628e200f We really want to hash pairs of directly-hashable data as directly
hashable data. This matters when we have pair<T*, U*> as a key, which is
quite common in DenseMap, etc. To that end, we need to detect when this
is safe. The requirements on a generic std::pair<T, U> are:

1) Both T and U must satisfy the existing is_hashable_data trait. Note
   that this includes the requirement that T and U have no internal
   padding bits or other bits not contributing directly to equality.
2) The alignment constraints of std::pair<T, U> do not require padding
   between consecutive objects.
3) The alignment constraints of U and the size of T do not conspire to
   require padding between the first and second elements.

Grow two somewhat magical traits to detect this by forming a pod
structure and inspecting offset artifacts on it. Hopefully this won't
cause any compilers to panic.

Added and adjusted tests now that pairs, even nested pairs, are treated
as just sequences of data.

Thanks to Jeffrey Yasskin for helping me sort through this and reviewing
the somewhat subtle traits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151883 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02 09:26:36 +00:00
..
AIXDataTypesFix.h
AlignOf.h
Allocator.h
Atomic.h
BlockFrequency.h Add missing includes/class declaration. 2011-11-04 18:30:30 +00:00
BranchProbability.h Make an obviously const interface actually be marked as const. 2011-11-20 11:22:03 +00:00
CallSite.h Refactor code to use new attribute getters on CallSite for NoCapture and ByVal. 2011-11-20 19:09:04 +00:00
Capacity.h Add missing includes/class declaration. 2011-11-04 18:30:30 +00:00
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 Sink codegen optimization level into MCCodeGenInfo along side relocation model 2011-11-16 08:38:26 +00:00
COFF.h Remove extra ,. 2011-11-16 01:36:50 +00:00
CommandLine.h Correct use of const in ParseCommandLineOptions 2012-02-07 19:36:01 +00:00
Compiler.h include/llvm/Support/Compiler.h: Invalidate LLVM_ATTRIBUTE_WEAK on cygming for now. 2011-11-15 05:24:26 +00:00
ConstantFolder.h
ConstantRange.h
CrashRecoveryContext.h
DataExtractor.h Add the DataExtractor utility class. 2011-09-13 19:42:16 +00:00
DataFlow.h
DataStream.h Fix comment-rulers. 2012-02-06 22:41:47 +00:00
DataTypes.h.cmake Fix pasto. 2011-11-05 09:45:17 +00:00
DataTypes.h.in Fix pasto. 2011-11-05 09:45:17 +00:00
Debug.h
DebugLoc.h
Disassembler.h
DOTGraphTraits.h Delete names for unused parameters in inline function definitions in headers, so LLVM users can compile with -Wunused-parameter. PR11257; based on patch by Kevin Harris. 2011-11-04 18:11:56 +00:00
Dwarf.h Update llvm debug version to support new structure and tag for Objective-C property's debug info. 2012-02-04 01:30:01 +00:00
DynamicLibrary.h Add missing includes/class declaration. 2011-11-04 18:30:30 +00:00
ELF.h Add support for gnu_indirect_function. 2011-12-12 17:34:04 +00:00
Endian.h Basic runtime dynamic loading capabilities added to ELFObjectFile, implemented 2012-01-22 09:01:03 +00:00
Errno.h
ErrorHandling.h
FEnv.h
FileSystem.h Zap unnecessary semicolons. 2011-12-15 21:11:38 +00:00
FileUtilities.h
Format.h Add support for dumping section headers to llvm-objdump. This uses the same 2011-10-10 21:21:34 +00:00
FormattedStream.h
GCOV.h Put GCOVFile and other related interface in a common header so that llvm-cov tool can share it with GCOV writer. 2011-10-04 17:24:48 +00:00
GetElementPtrTypeIterator.h
GraphWriter.h Twinify GraphWriter a little bit. 2011-11-15 16:26:38 +00:00
Host.h revert r147542 after comments from Joerg Sonnenberger 2012-01-05 18:28:46 +00:00
IncludeFile.h
InstIterator.h
InstVisitor.h [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
IRBuilder.h
IRReader.h Make SMDiagnostic a little more sane. Instead of passing around note/warning/error as a 2011-10-16 05:43:57 +00:00
JSONParser.h Remove extraneous ';'s. 2012-01-23 22:55:02 +00:00
LeakDetector.h
LICENSE.TXT
LockFileManager.h Move Clang's file-level locking facility over to LLVM's support 2012-01-29 20:15:10 +00:00
MachO.h Object: Add isSymbolWeak. 2011-10-17 23:54:22 +00:00
ManagedStatic.h Add support for tsan annotations (thread sanitizer, a valgrind-based tool). 2011-11-14 20:50:16 +00:00
MathExtras.h Hexagon backend support 2011-12-12 21:14:40 +00:00
Memory.h
MemoryBuffer.h use 64-bit types instead of off_t/size_t to avoid the issue when 2011-09-15 23:13:00 +00:00
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 Remove a couple unused methods. PR11201. 2011-11-01 05:11:01 +00:00
PathV2.h Update the comment for system_temp_directory() to indicate when it 2011-09-14 23:21:47 +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 Remove SetWorkingDirectory from the Process interface. Nothing in LLVM 2012-01-15 08:41:35 +00:00
Program.h Support/Program: Make Change<stream>ToBinary return error_code. 2011-12-13 23:16:49 +00:00
raw_os_ostream.h
raw_ostream.h
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 Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance 2011-10-16 04:47:35 +00:00
Solaris.h
SourceMgr.h PR11143: Save the old diagnostic handler and call it when munging diagnostics for #line directives. 2011-10-16 10:48:29 +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 Switch the llvm::Triple class to immediately parse the triple string on 2012-02-21 03:39:36 +00:00
TargetSelect.h
Threading.h
ThreadLocal.h
Timer.h
TimeValue.h
ToolOutputFile.h
type_traits.h We really want to hash pairs of directly-hashable data as directly 2012-03-02 09:26:36 +00:00
TypeBuilder.h
Valgrind.h use llvm-config.h in public header 2011-11-28 00:49:01 +00:00
ValueHandle.h
Win64EH.h