llvm-6502/include/llvm
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 Tidied up target triple OS detection. NFC 2014-11-22 19:12:10 +00:00
Analysis Masked Vector Load and Store Intrinsics. 2014-11-23 08:07:43 +00:00
AsmParser Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
Bitcode Revert commits r222146 and r222137. 2014-11-17 19:26:40 +00:00
CodeGen Masked Vector Load and Store Intrinsics. 2014-11-23 08:07:43 +00:00
Config Expose LLVM version string via macro in llvm-config.h, and modify Go bindings 2014-11-19 03:34:17 +00:00
DebugInfo Reapply "[dwarfdump] Add support for dumping accelerator tables." 2014-11-14 16:15:53 +00:00
ExecutionEngine [MCJIT] Remove JITEventListener::NotifyFreeingMachineCode. This method is dead 2014-11-21 01:57:09 +00:00
IR Masked Vector Load and Store Intrinsics. 2014-11-23 08:07:43 +00:00
IRReader Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
LineEditor
Linker Fix formatting. NFC. 2014-11-21 18:05:55 +00:00
LTO Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
MC Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
Object llvm-readobj: teach it how to dump COFF base relocation table 2014-11-19 00:18:07 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData llvm-cov: Sink some reporting logic into CoverageMapping 2014-11-14 01:50:32 +00:00
Support Support: Add *cast_or_null<> for pointer wrappers 2014-11-24 03:13:02 +00:00
TableGen Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
Target Masked Vector Load and Store Intrinsics. 2014-11-23 08:07:43 +00:00
Transforms [SeparateConstOffsetFromGEP] Allow SeparateConstOffsetFromGEP pass to lower GEPs. 2014-11-19 06:24:44 +00:00
CMakeLists.txt Remove llvm_headers_do_not_build for the benefit of XCode and Visual Studio users. 2014-08-14 00:51:47 +00:00
InitializePasses.h Add back r222061 with a fix. 2014-11-17 02:28:27 +00:00
LinkAllIR.h
LinkAllPasses.h Add back r222061 with a fix. 2014-11-17 02:28:27 +00:00
module.modulemap [modules] Stop excluding Support/Debug.h from the Support module. This header 2014-10-13 00:41:03 +00:00
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h
PassManager.h
PassRegistry.h [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
PassSupport.h Defining a new API for debug options that doesn't rely on static global cl::opts. 2014-10-15 21:54:35 +00:00