llvm-6502/unittests/Transforms/Utils
Duncan P. N. Exon Smith 1545953510 IR: Stop using DIDescriptor::is*() and auto-casting
`DIDescriptor`'s subclasses allow construction from incompatible
pointers, and `DIDescriptor` defines a series of `isa<>`-like functions
(e.g., `isCompileUnit()` instead of `isa<MDCompileUnit>()`) that clients
tend to use like this:

    if (DICompileUnit(N).isCompileUnit())
      foo(DICompileUnit(N));

These construction patterns work together to make `DIDescriptor` behave
differently from normal pointers.

Instead, use built-in `isa<>`, `dyn_cast<>`, etc., and only build
`DIDescriptor`s from pointers that are valid for their type.

I've split this into a few commits for different parts of LLVM and clang
(to decrease the patch size and increase the chance of review).
Generally the changes I made were NFC, but in a few places I made things
stricter if it made sense from the surrounded code.

Eventually a follow-up commit will remove the API for the "old" way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234255 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-06 23:18:49 +00:00
..
ASanStackFrameLayoutTest.cpp Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
Cloning.cpp IR: Stop using DIDescriptor::is*() and auto-casting 2015-04-06 23:18:49 +00:00
CMakeLists.txt MapMetadata: Allow unresolved metadata if it won't change 2015-03-17 01:14:40 +00:00
IntegerDivision.cpp Add support for software expansion of 64-bit integer division instructions. 2013-11-19 06:54:19 +00:00
Local.cpp Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
Makefile llvm/unittests: Simplify LINK_COMPONENTS. 2012-06-21 22:17:51 +00:00
ValueMapperTest.cpp MapMetadata: Allow unresolved metadata if it won't change 2015-03-17 01:14:40 +00:00