llvm-6502/tools
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
..
bugpoint [opaque pointer type] API migration for GEP constant factories 2015-04-02 18:55:32 +00:00
bugpoint-passes
dsymutil Don't declare all text sections at the start of the .s 2015-03-20 20:00:01 +00:00
gold Fix PR23045. 2015-03-30 21:36:43 +00:00
llc Make llc use getHostCPUFeatures when 'native' is specified for cpu. 2015-03-31 05:52:57 +00:00
lli [Orc] Add support classes for inspecting and running C++ static ctor/dtors, and 2015-04-02 04:34:45 +00:00
llvm-ar Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
llvm-as
llvm-bcanalyzer [opaque pointer type] Bitcode support for explicit type parameter on GEP. 2015-02-25 01:08:52 +00:00
llvm-c-test
llvm-config Refactoring CMake CrossCompile module. 2015-03-12 17:33:34 +00:00
llvm-cov llvm-cov: Require a subcommand when invoked as llvm-cov 2015-03-24 23:34:36 +00:00
llvm-cxxdump Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
llvm-diff Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default" 2015-03-03 21:18:16 +00:00
llvm-dis llvm-dis: Use the new DebugLoc API, NFC 2015-03-30 20:04:06 +00:00
llvm-dwarfdump
llvm-extract Make DataLayout Non-Optional in the Module 2015-03-04 18:43:29 +00:00
llvm-go llvm-go: Set $GCCGO instead of putting a gccgo executable on $PATH. 2015-02-14 01:45:57 +00:00
llvm-jitlistener llvm-jitlistener: Add missing include. 2015-03-25 17:12:36 +00:00
llvm-link tools: Unify how verifyModule() is called 2015-03-31 03:07:23 +00:00
llvm-lto libLTO, llvm-lto, gold: Introduce flag for controlling optimization level. 2015-03-19 22:01:00 +00:00
llvm-mc Replace the MCSubtargetInfo parameter with a Triple when creating 2015-03-31 00:10:04 +00:00
llvm-mcmarkup
llvm-nm Cleanup else-after-return and add an early-return to llvm-nm 2015-03-23 21:17:43 +00:00
llvm-objdump Fix failure on builder clang-cmake-mips where it was printing a 32-bit address 2015-04-06 22:33:43 +00:00
llvm-pdbdump [llvm-pdbdump] Display full enum definitions. 2015-03-04 06:09:53 +00:00
llvm-profdata Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
llvm-readobj [llvm-readobj] add support for macho universal binary. 2015-03-24 20:26:55 +00:00
llvm-rtdyld Replace the MCSubtargetInfo parameter with a Triple when creating 2015-03-31 00:10:04 +00:00
llvm-shlib Raising minimum required CMake version to 2.8.12.2. 2015-03-23 20:03:57 +00:00
llvm-size
llvm-stress Verifier: Remove the separate -verify-di pass 2015-03-19 22:24:17 +00:00
llvm-symbolizer Purge unused includes throughout libSupport. 2015-03-23 18:07:13 +00:00
lto Fix build failure. 2015-03-19 22:12:08 +00:00
macho-dump
msbuild
obj2yaml [obj2yaml/yaml2obj] Add SHT_GROUP support. 2015-02-21 04:28:26 +00:00
opt IR: Stop using DIDescriptor::is*() and auto-casting 2015-04-06 23:18:49 +00:00
verify-uselistorder tools: Unify how verifyModule() is called 2015-03-31 03:07:23 +00:00
yaml2obj Make helper functions static. 2015-03-09 16:23:46 +00:00
CMakeLists.txt llvm-cxxdump: Rename llvm-vtabledump to llvm-cxxdump 2015-03-15 01:30:58 +00:00
LLVMBuild.txt
Makefile llvm-cxxdump: Rename llvm-vtabledump to llvm-cxxdump 2015-03-15 01:30:58 +00:00