summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-24 03:13:02 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-24 03:13:02 +0000
commit403011848502577344a222633918496fa03f32d4 (patch)
tree53da2c91c823c5aae270237cc1e35b1126b0e362 /llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp
parentba6d83e64b1923ccf56c843fdbb0fee11c45c5aa (diff)
downloadbcm5719-llvm-403011848502577344a222633918496fa03f32d4.tar.gz
bcm5719-llvm-403011848502577344a222633918496fa03f32d4.zip
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
Diffstat (limited to 'llvm/lib/ExecutionEngine/RTDyldMemoryManager.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud