llvm-6502/unittests
Duncan P. N. Exon Smith 5deb1bf97f Support: Add *cast_or_null<> for pointer wrappers
Fill in omission of `cast_or_null<>` and `dyn_cast_or_null<>` for types
that wrap pointers (e.g., smart pointers).

Type traits need to be slightly stricter than for `cast<>` and
`dyn_cast<>` to resolve ambiguities with simple types.

There didn't seem to be any unit tests for pointer wrappers, so I tested
`isa<>`, `cast<>`, and `dyn_cast<>` while I was in there.

This only supports pointer wrappers with a conversion to `bool` to check
for null.  If in the future it's useful to support wrappers without such
a conversion, it should be a straightforward incremental step to use the
`simplify_type` machinery for the null check.  In that case, the unit
tests should be updated to remove the `operator bool()` from the
`pointer_wrappers::PTy`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222644 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-24 03:13:02 +00:00
..
ADT Compilation test for PostOrderIterator. 2014-11-20 19:33:33 +00:00
Analysis CallGraphTest.cpp: Remove invalid tests. ++S might step over F if S == F. 2014-11-18 12:23:19 +00:00
Bitcode [Bitcode] AtEndOfStream should only check against the size if it's known. 2014-11-13 00:08:41 +00:00
CodeGen
DebugInfo
ExecutionEngine [MCJIT] Make repeat calls to MCJIT::getPointerToFunction for declarations safe. 2014-10-22 23:18:42 +00:00
IR Add unittest for extreme alignments. 2014-10-23 14:45:19 +00:00
LineEditor [CMake] LineEditorTests: Add Support to link_components. 2014-07-24 11:44:33 +00:00
Linker Fix the autoconf build. 2014-11-17 21:06:38 +00:00
MC Dispose disassembler after use in unit test. 2014-11-15 10:53:12 +00:00
Option
Support Support: Add *cast_or_null<> for pointer wrappers 2014-11-24 03:13:02 +00:00
Transforms Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
CMakeLists.txt Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
Makefile Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
Makefile.unittest