1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/unittests
Duncan P. N. Exon Smith 263f11dd21 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`.

llvm-svn: 222644
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 DIE: Pass ownership of children via std::unique_ptr rather than raw pointer. 2014-04-25 20:00:34 +00:00
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