llvm/unittests/Support
Sean Silva 8b8fa7b2f4 Casting.h: Automatically handle isa<Base>(Derived).
Additionally, all such cases are handled with no dynamic check.

All `classof()` of the form

    class Foo {
      [...]
      static bool classof(const Bar *) { return true; }
      [...]
    }

where Foo is an ancestor of Bar are no longer necessary.
Don't write them!

Note: The exact test is `is_base_of<Foo, Bar>`, which is non-strict, so
that Foo is considered an ancestor of itself.

This leads to the following rule of thumb for LLVM-style RTTI:

    The argument type of `classof()` should be a strict ancestor.

For more information about implementing LLVM-style RTTI, see
docs/HowToSetUpLLVMStyleRTTI.rst

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165765 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-11 23:30:40 +00:00
..
AlignOfTest.cpp Fix up erroneous alignas usage while making this portable to GCC 4.7 2012-09-14 22:26:11 +00:00
AllocatorTest.cpp BumpPtrAllocator: Make sure threshold cannot be initialized with a value smaller than the slab size. 2012-03-01 22:10:16 +00:00
BlockFrequencyTest.cpp For reasons I can't fathom MSVC supports ULL but not LLU suffixes on long long integer literals. 2012-06-17 14:53:53 +00:00
Casting.cpp Casting.h: Automatically handle isa<Base>(Derived). 2012-10-11 23:30:40 +00:00
CMakeLists.txt Adding MCJIT and MemoryBuffer unit tests 2012-10-04 20:29:44 +00:00
CommandLineTest.cpp Added test for non-static use of cl::opt (fixed in r160170) 2012-08-13 10:43:36 +00:00
ConstantRangeTest.cpp make ConstantRange::zeroExtend() optimal 2012-07-23 20:33:29 +00:00
DataExtractorTest.cpp DataExtractor: Fix integer truncation issues in LEB128 extraction. 2012-08-20 10:52:11 +00:00
EndianTest.cpp Merge System into Support. 2010-11-29 18:16:10 +00:00
FileOutputBufferTest.cpp Initial commit of new FileOutputBuffer support class. 2012-08-01 02:29:50 +00:00
formatted_raw_ostream_test.cpp formatted_raw_ostream: Fix a serious bug in tell(). 2012-09-14 23:15:56 +00:00
IntegersSubsetTest.cpp Revert "IntRange:" as it appears to be breaking self hosting. 2012-07-02 23:22:21 +00:00
LeakDetectorTest.cpp Fix death tests in -Asserts builds. 2010-03-17 01:18:45 +00:00
Makefile Minimal raw_ostream unit tests 2009-03-17 16:14:59 +00:00
ManagedStatic.cpp Fix Windows build, don't try to #include <pthread.h> when we know it's not 2011-11-14 22:10:23 +00:00
MathExtrasTest.cpp Fixes warnings emitted by Visual Studio 2010 compiler. 2011-03-01 23:11:57 +00:00
MemoryBufferTest.cpp Adding MCJIT and MemoryBuffer unit tests 2012-10-04 20:29:44 +00:00
MemoryTest.cpp This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT. 2012-09-19 20:46:12 +00:00
Path.cpp Properly test the LLVM_USE_RVALUE_REFERENCES macro. 2012-08-15 19:21:42 +00:00
raw_ostream_test.cpp Add raw_ostream::write_escaped, for writing escaped strings. 2009-10-17 20:43:08 +00:00
RegexTest.cpp Add Regex::sub, for doing regular expression substitution with backreferences. 2010-02-17 20:08:42 +00:00
SwapByteOrderTest.cpp Merge System into Support. 2010-11-29 18:16:10 +00:00
TimeValue.cpp unittests: Merge SystemTests back into SupportTests. 2010-11-29 22:29:04 +00:00
ValueHandleTest.cpp Change all self assignments X=X to (void)X, so that we can turn on a 2010-12-23 00:58:24 +00:00
YAMLParserTest.cpp Suppress stderr noise when test case runs. 2012-07-31 22:18:15 +00:00