llvm-6502/include/llvm/Support
David Blaikie 0711d46a72 Limit cast machinery to preserve const and not accept temporaries
After cleaning up the following type hierarchies:
  * TypeLoc: r175462
  * SVal: r175594
  * CFGElement: r175462
  * ProgramPoint: r175812
that all invoked undefined behavior by causing a derived copy construction of a
base object through an invalid cast (thus supporting code that relied on
casting temporaries that were direct base objects) Clang/LLVM is now clean of
casts of temporaries. So here's some fun SFINAE machinery (courtesy of Eli
Friedman, with some porting back from C++11 to LLVM's traits by me) to cause
compile-time failures if llvm::cast & friends are ever passed an rvalue.

This should avoid a repeat of anything even remotely like PR14321/r168124.

Thanks to Jordan Rose for the help with the various Static Analyzer related
hierarchies that needed cleaning up, Eli for the SFINAE, Richard Smith, John
McCall, Ted Kremenek, and Anna Zaks for their input/reviews/patience along the
way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 22:48:34 +00:00
..
AIXDataTypesFix.h
AlignOf.h Incrase the number of parameters for AlignedCharArrayUnion. 2013-01-09 10:39:16 +00:00
Allocator.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ArrayRecycler.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Atomic.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
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 Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
Capacity.h Add missing includes/class declaration. 2011-11-04 18:30:30 +00:00
Casting.h Limit cast machinery to preserve const and not accept temporaries 2013-02-21 22:48:34 +00:00
CFG.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
circular_raw_ostream.h Use empty parens for empty function parameter list instead of '(void)'. 2012-11-15 16:51:49 +00:00
CodeGen.h Move the TLSModel information into the TargetMachine rather than hiding 2012-04-08 17:20:55 +00:00
COFF.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
CommandLine.h Simplify code. No functionality change. 2013-02-19 21:49:54 +00:00
Compiler.h Make Optional<T>'s operator bool 'explicit' in C++11 2013-02-21 06:05:57 +00:00
ConstantFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
ConstantRange.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ConvertUTF.h llvm-gcc -pedantic warns about C++ comments in C90 mode even if they're 2013-02-13 22:45:52 +00:00
CrashRecoveryContext.h
DataExtractor.h Be consistent about the field name - AddressSize, not PointerSize. Add 2013-02-05 23:26:02 +00:00
DataFlow.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
DataStream.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
DataTypes.h.cmake Remove OpenBSD defines: 2012-08-08 18:37:39 +00:00
DataTypes.h.in Remove OpenBSD defines: 2012-08-08 18:37:39 +00:00
Debug.h Typos. 2012-07-27 21:41:59 +00:00
DebugLoc.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Disassembler.h
DOTGraphTraits.h ScheduleDAG: colorize the DOT graph and improve formatting. 2013-01-25 07:45:25 +00:00
Dwarf.h Initial support for DWARF CFI parsing and dumping in LLVM 2013-02-05 23:30:58 +00:00
DynamicLibrary.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ELF.h ELF symbol table field st_other support, 2013-02-19 22:29:00 +00:00
Endian.h [Support][Endian] Add support for specifying the alignment and native unaligned types. 2013-01-02 20:14:11 +00:00
Errno.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ErrorHandling.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ErrorOr.h [Support][ErrorOr] Add support for convertable types. 2013-02-06 22:28:53 +00:00
FEnv.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
FileOutputBuffer.h [Support] Make FileOutputBuffer work on Windows. 2012-12-03 22:09:52 +00:00
FileSystem.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
FileUtilities.h
Format.h Fix Doxygen issues: 2012-09-14 14:57:36 +00:00
FormattedStream.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
GCOV.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
GetElementPtrTypeIterator.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
GraphWriter.h ScheduleDAG: colorize the DOT graph and improve formatting. 2013-01-25 07:45:25 +00:00
Host.h Introduce llvm::sys::getProcessTriple() function. 2013-01-16 17:27:22 +00:00
IncludeFile.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
InstIterator.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
IntegersSubset.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
IntegersSubsetMapping.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
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
LeakDetector.h
LEB128.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
LICENSE.TXT
Locale.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
LockFileManager.h Fix a race condition in the lock-file manager: once the lock file is 2013-01-10 02:01:35 +00:00
MachO.h Remove tabs. 2012-07-19 00:01:00 +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 Add parens to suppress an MSVC 2012 << precedence warning 2013-01-25 22:12:45 +00:00
Memory.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
MemoryBuffer.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
MemoryObject.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Mutex.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
MutexGuard.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 06:31:17 +00:00
NoFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
OutputBuffer.h
PassNameParser.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Path.h
PathV1.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
PathV2.h Fix a doxygen issue: these examples are supposed to be displayed preformatted. 2012-09-13 11:42:30 +00:00
PatternMatch.h When code size is the priority (Oz, MinSize attribute), help llvm 2013-01-07 18:37:41 +00:00
PluginLoader.h
PointerLikeTypeTraits.h
PredIteratorCache.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
PrettyStackTrace.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
Process.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Program.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
raw_os_ostream.h Add LLVM_OVERRIDE to methods that override their base classes. 2012-09-23 02:12:10 +00:00
raw_ostream.h Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments. 2013-02-18 23:11:17 +00:00
Recycler.h Special case Recycler::clear(BumpPtrAllocator). 2013-01-04 22:35:45 +00:00
RecyclingAllocator.h
Regex.h Add backreference matching capabilities to Support/Regex, with 2012-11-28 19:00:02 +00:00
Registry.h Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-17 06:31:17 +00:00
RegistryParser.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
RWMutex.h Use LLVM_DELETED_FUNCTION for copy constructors and copy assignment operators that aren't implemented. 2012-09-16 21:37:56 +00:00
SaveAndRestore.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Signals.h Signal.h: Add <cstdio> for FILE*, since r171989. 2013-01-10 05:23:59 +00:00
SMLoc.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Solaris.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
SourceMgr.h Add basic fix-its to SMDiagnostic. 2013-01-10 18:50:15 +00:00
StreamableMemoryObject.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
StringPool.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
SwapByteOrder.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
system_error.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
SystemUtils.h
TargetFolder.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
TargetRegistry.h Remove MCTargetAsmLexer and its derived classes now that edis, 2012-12-20 14:43:30 +00:00
TargetSelect.h Add InitializeNativeTargetDisassembler function. 2012-03-26 21:56:56 +00:00
Threading.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ThreadLocal.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
Timer.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
TimeValue.h Fix initialization-order bug in llvm::Support::TimeValue. TimeValue::now() is explicitly called during module initialization of lib/Support/Process.cpp. It reads the field of global object PosixZeroTime, which is not guaranteed to be initialized at this point. Found by AddressSanitizer with -fsanitize=init-order option. 2013-02-19 11:35:39 +00:00
ToolOutputFile.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
type_traits.h [Support] Port ErrorOr<T> from lld to C++03. 2013-01-20 20:32:30 +00:00
Valgrind.h Sort the #include lines for the include/... tree with the script. 2012-12-03 17:02:12 +00:00
ValueHandle.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
Win64EH.h Updates to Win64EH.h structures. 2012-12-05 20:12:13 +00:00
YAMLParser.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
YAMLTraits.h Remove redundant 'llvm::' qualifications 2013-01-13 16:01:15 +00:00